Moderator
t-p
(@t-p)
“Error establishing a database connection” means that there is a problem:
– with the connection to your database
— a problem with the credentials stored in the wp-config.php file not matching what mysql expects.
– Try reviewing the following codex for possible reasons and solutions: http://codex.ww.wp.xz.cn/Common_WordPress_Errors#Error_Establishing_Database_Connection
Thanks Tara
I will look at your link.
I have never had the problem before… I have only changed the three areas in the wp-config.php file.
database_name, username and password as instructed. (I’ve substituted with XXX below)
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘alimay_xxx’);
/** MySQL database username */
define(‘DB_USER’, ‘alimay_xxx’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘xxx’);
These respective details are identical (copy pasted) into the MySQL wizard.
I had the Server Farm tech support look into this as I could not rectify, they volunteered that there is no d’base table set up and no data in the MySQL d’base at all after installation.
Moderator
t-p
(@t-p)
Is this the guide you followed to install the WP:
https://codex.ww.wp.xz.cn/Installing_WordPress
Moderator
t-p
(@t-p)
did you create database before installing WP?
WP does not create database for you.
But it will populate the database if you have created one.
Hi Tara,
Yes was all set up. 3 times actually.
I completely wiped and restarted entire site 3 times, with 3 completely independent database set ups and 3 completely new re-installs of WP 6.4
It’s a very strange outcome. Prior to WP installs, once the database was set up on the server, the Database showed as set up and correct name on the server when looking via phpMyAdmin.
User was also correct and associated with database and with full permissions
Moderator
t-p
(@t-p)
This is most likely a server issue.
You need to ask your hosting provider as to why WP cannot populate the database you createed
Yes. I have just taken the only last step and removed the URL and all configuration completely from the server and then re-established new set up of the domain on the server.
We’ll see what that brings. And will update here if successful
Thanks for your attention
Ok,
After complete wipe and restart of server Dbase and WP 4.6 new complete upload
NEW ERROR MESSAGE reads
Parse error: syntax error, unexpected ”); ‘ (T_CONSTANT_ENCAPSED_STRING) in /home/alimay/public_html/wp-config.php on line 29
Line 29 appears to be the password reference line. Which seems bizarre since the details (as before) are copy & pasted from server after setting up user password and put into the correct place in the wp-config.php file
/** MySQL database password */
define(‘DB_PASSWORD’, ‘xxx’);
@alimay6 The Parse error: syntax error, unexpected ''); ' (T_CONSTANT_ENCAPSED_STRING) in /home/alimay/public_html/wp-config.php on line 29 message means you’ve probably forgotten to close a quote around a string.
For example, missing the closing quote: define('DB_PASSWORD', ‘xxx );, or maybe a “curly quote” (looks like a quote mark, but isn’t actually) just type all the quotation marks on that line in again using a plain text editor
Hi Dion,
First time in text edit it reverted to error message – Error establishing a database connection.
I have just re-edited in dreamweaver to see the quote marks and it has worked.
Quality work!! Thank you very much