Misleading "Error establishing a database connection"
-
Today I migrated my multisite wordpress install from staging domain to the public www domain, I replaced the domain entries everywhere except for the “wp_blogs” table (this is the first time I do such thing, so it’s my bad), the problem I found is, even if my database information was correct in wp-config.php, I got the the:
“Error establishing a database connection”
This made me try to solve the issue fixing the mysql connection of course, after an hour of hustle and really not understading why wordpress can’t connect to my database even if I could connect fine trough the shell, I tried to login into the /wp-admin where I finally got a meaningful error message: the domain wasn’t listed in the wp_blogs table, after I fixed that everything was fine.
I’m posting this in part to report it as a bug and also to save some other lost soul the trouble, in either case, it would make a lot more sense if in the frontend you can get the same meaningful error message instead of the totally misleading error establishing a database connection.. afterall wordpress was able to connect to the database, just didn’t found the right entry in wp_blogs.
- The topic ‘Misleading "Error establishing a database connection"’ is closed to new replies.