Hi, Basically, I logged onto wordpress admin this morning to see an error message saying that the MySQL database had a problem, and, because of this I couldn't login (it did say my user and password were both fine, though, so it's definately a database problem). Anyway, I checked over the files and they're all OK. The blog had worked fine previous to this, so I was a bit confused. I've now deleted the WP files and reuploaded them, and I'm getting this message: 'Error establishing a database connection' What does it mean? What's wrong with my database? Any advice greatly appreciated.
Double check that your config.php file is still correct for your database parameters. Maybe try creating another database user and update the config.php file with the new user.
Jestep, that's the first thing I did, and I haven;t changed anything since the blog worked. For some reason the database seems to have gone down. I then tried with a new database, and again it didn't work.
Yeah, I'm 99% sure that's what the problem is, but they aren't responding to my PMs or emails. Thanks anyway for your help
i've had similar problem from my experience it was the database server went down You should contact your webhosting company, and if they could not restore the state, then ask for refunds
If you can access your DB via phpmyadmin, then the problem is most likely not the server / db. phpmyadmin connects the same way that your website would, so if you can access it, your website should also be able to. Do you have any plugins enabled? Also, check your error log and see if you can find a more detailed error in there.
Just checking - make sure you haven't added your themes index.php file into the main directory (replacing the top index.php files). Classic mistake from me.
After deleting all the files, did you create a new 'wp-config.php' file and edited it? And what kind of a mysql error were you getting in the first place? Its also possible some tables of your DB might have gotten corrupted.
Nope, none of the above. I hadn't changed anything, and one day it just stopped working, saying something about an error establishing the database. Basically, it's a database problem
That means sure you have wrong user name or password. did you create user name and password to your wordpress mysql database first? You have to create it and assign all database previleges? do you use cpanel? If so assuming that you created user as guest MySQL database: <yourcpaneluser_databasename> MySQL user: <yourcpaneluser_guest> That means you must have
My user and pass is fine: it says they are. I've tried different variations for the user of the DB (should it be xxx_user or just user, as I've tried both and neither work?) Here is the error message I get when I go on /wp-admin/install.php: We were able to connect to the database server (which means your username and password is okay) but not able to select the XXX_XXX database.
yeah! it looks like mysql not running. just ask the hosting provider to restart the server. mysql will be up as well.