[wp-trac] [WordPress Trac] #65034: More help for trouble shooting initial Database problems
WordPress Trac
noreply at wordpress.org
Tue Apr 7 13:19:16 UTC 2026
#65034: More help for trouble shooting initial Database problems
-------------------------+-----------------------------
Reporter: ralatalo | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.9.4
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Once you have enabled debugging in wp-config.php you get more information
about database connection failure but maybe I missed a toggle because I
didn't get a 'good' error message till I though together my own small PHP
script which included:
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
Where I finally got: mysqli_real_connect(): (HY000/2002): Permission
denied
My Suggestion would be to Increase the diagnostic output once debugging is
enabled, in particularly, to include something like:
The connection request below processed your configuration data as follows:
mysqli_real_connect( {DBhandle} , host, dbuser, dbpassword, database,
port, socket, client_flags );
as host=’xxx’, dbuser=’xxxx’, dbpassword=’xxxxx’, database=’xxxxx’ ,
port=’xxxx’ , socket=’xxxxx’
And something showing the reported error:
Currently you show something like:
This either means that the username and password information in your %1$s
file is incorrect or that contact with the database server at %2$s could
not be established. This could mean your host’s database server is
down.'
Then ask them if they are sure that they have the correct username and
password, and correct hostname and if the database is running. Which I
honestly found a little frustrating as I was alternating between hacking
class-wpdb.php to figure out how you processed my entries and logging into
mariadb directly using those same options.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65034>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list