2016-04-08 178 views
1

我的本地主機nginx上的Wordpress配置有問題。Wordpress localhost OSX安裝:建立數據庫連接時出錯

在wp-admin配置上我收到Error establishing a database connection

當我手動創建WP-Config中,MySQL的日誌我只有Aborted connection 12 to db: 'unconnected' user: 'dimmi' host: 'localhost' (Got an error reading communication packets)

這是我的調試日誌:

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Users/patryk/Public/dimmi/dimmi_wordpress2/wp-includes/wp-db.php on line 1488 

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Users/patryk/Public/dimmi/dimmi_wordpress2/wp-includes/wp-db.php on line 1518 

Warning: mysql_connect(): No such file or directory in /Users/patryk/Public/dimmi/dimmi_wordpress2/wp-includes/wp-db.php on line 1518` 

命令行登錄和簡單的PHP腳本工作完美,文件權限是777

我有OSX El Captain,使用自制軟件安裝mysql。我跑出了想法:/

回答

0

問題是在php和mysql.pls之間的連接檢查下面;

1,檢查用戶名,密碼是否正確
2.檢查用戶的dimmi'有權限的主機「localhost」的
3.is MySQL的運行? (因爲你可以從終端登錄,運行MySQL)
4.try到遠程登錄本地主機3306
(這將返回 「連接到本地主機。 轉義字符是‘^]’」如果MySQL是你的機器上運行3306)

+0

所有的工作 – Patryk

相關問題