admin管理员组

文章数量:1323342

I hope you can help me to fix my problem.

I am using WordPress for the first time, and I don't know why I am getting Error establishing a database connection knowing that I have created the file wp-config.php by myself then I provided the information of my database. I create a virtual host because I need to work just in localhost.

for the information: I am using the above version below:

WordPress 5.5.1 / wampserver 3.2.3 / PHP 7.4.9 / MySQL 5.7.31

thank you for your support!!!

I hope you can help me to fix my problem.

I am using WordPress for the first time, and I don't know why I am getting Error establishing a database connection knowing that I have created the file wp-config.php by myself then I provided the information of my database. I create a virtual host because I need to work just in localhost.

for the information: I am using the above version below:

WordPress 5.5.1 / wampserver 3.2.3 / PHP 7.4.9 / MySQL 5.7.31

thank you for your support!!!

Share Improve this question edited Sep 8, 2020 at 7:23 Hector 6821 gold badge7 silver badges18 bronze badges asked Sep 3, 2020 at 0:23 codeprocodepro 1 1
  • First of all thank you for your comments, I have tried to work with the 32 bits version of wampserver even if i have windows 64 bits. And finally it works , i don't know why but at least i am able to establish connection now . Thank you ! – codepro Commented Sep 4, 2020 at 13:01
Add a comment  | 

1 Answer 1

Reset to default 0

Are you creating WordPress from scratch? You do not need to create the wp-config.php manually. Just open your installed WordPress from your browser and it will run an installer for you.

If you migrated from an existing WordPress installation (from another server/PC), check your database settings in wp-config.php file.

// ** MySQL settings ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'amadeus' );

/** MySQL database username */
define( 'DB_USER', 'root' );

/** MySQL database password */
define( 'DB_PASSWORD', '' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

本文标签: phpError establishing a database connection (configuration)