【发布时间】:2017-07-13 15:42:24
【问题描述】:
有很多关于此的文档,但我的故障排除失败了。我安装了适用于 Windows 的 XAMPP,它工作正常,但不适用于我的 Mac OS Sierra。
我的 XAMPP 版本是 5.6.30-0,我的服务器正在运行。
这是我的 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', ‘admin’);
/** MySQL database password */
define('DB_PASSWORD', ‘darkall’);
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
用户“admin”是我为 phpMyAdmin 中的“WP”数据库创建的新用户。 WP database exists in phpMyAdmin
我尝试转到http://localhost/wp/,但收到错误“建立数据库连接时出错”
【问题讨论】:
-
能否用单引号替换 WP、admin、darkall 之间的花引号,看看是否是问题所在?
-
您好 Cyto,非常感谢您的回复。有效。显然,我的 Mac 键盘默认为我提供了这些花引号。如果可能的话,我应该改变它。非常感谢您及时回复
/** The name of the database for WordPress */ define('DB_NAME', 'WP'); /** MySQL database username */ define('DB_USER', 'admin'); /** MySQL database password */ define('DB_PASSWORD', 'darkall');