简体   繁体   中英

Error establishing database connection in WordPress install

I am working with a managed server from 1&1 and I am trying to manually install WordPress with no luck. I went and downloaded the WP core files, uploaded them via FTP and then went into mySQL and created the database and username/password etc. and assigned the privileges. When I try to install wordpress via "www.example.com/wp-admin/install.php ", I continuously receive the error:

Error establishing a database connection

I tried everything and triple checked my user,password, etc.

Here is my credentials (Password is hidden):

在此处输入图片说明

在此处输入图片说明

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

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

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

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

Host name is always a localhost. for check your database credential is correct or not please feel a wrong value @ let me know I am here

Try use 127.0.0.1 instead of localhost as the db host. Had the same issue and this fixed it for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM