[英]Wordpress Error establishing a database connection in Linux server
你可以檢查你的wp-config.php文件嗎? 看看是否有正確的信息。 應該是這樣的。
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wp');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
嘗試轉到/ var / log / php-fpm並檢查error.log文件。 就我而言,我跑了:
/etc/init.d/mysqld
消息狀態:mysqld已死,但子系統已鎖定
原來mysql已停止! 因為我什么都沒改變,所以如何發生仍然是一個謎。 解決方案是簡單地運行:
/etc/init.d/mysqld開始
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.