【发布时间】:2021-05-28 11:45:21
【问题描述】:
我正在尝试在WordPress 开始我的第一个项目并输入这些数据
-
Database Name:wp-project-1 -
DB_USER:root -
DB_PASSWORD:`` -
DB_HOST:localhost -
Table Prefix:wp_
在我的wp-config-sample.php:
define( 'DB_NAME', 'wp-project-1' );
/** MySQL database username */
define( 'DB_USER', 'root' );
/** MySQL database password */
define( 'DB_PASSWORD', '' );
/** 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', '' );
但是当我提交它们时它会说这样的错误:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure you have typed the correct hostname?
Are you sure the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
这里我使用的是xampp服务器,我的xampp端口号是3307(我改了,因为3306每次都很忙。)
我该如何解决?
【问题讨论】: