Reputation: 949
I am trying to start my 1st project in WordPress
and put this data
Database Name
: wp-project-1
DB_USER
: root
DB_PASSWORD
: ``DB_HOST
: localhost
Table Prefix
: wp_
And in my 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', '' );
But it says error like this when I submit them:
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.
Here I am using xampp
server, and my xampp
port number is 3307
(I change that cause 3306 was busy every time.)
How can I fix it?
Upvotes: 1
Views: 2725
Reputation: 1240
Please change your wp-config-sample.php
file to wp-config.php
Upvotes: 1
Reputation:
on xampp you can open control panel where it says apache hit the config select php ini and find the following
mysqli.default_port=
Upvotes: 3