MySQL/Wordpress problem

Discussion in 'MySQL' started by kiteguy123, Nov 8, 2008.

  1. #1
    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.
     
    kiteguy123, Nov 8, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    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, Nov 8, 2008 IP
  3. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #3
    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. :(
     
    kiteguy123, Nov 8, 2008 IP
  4. einsteinsboi

    einsteinsboi Well-Known Member

    Messages:
    1,122
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Did you check with your webhost? Their database server may have been down.
     
    einsteinsboi, Nov 11, 2008 IP
  5. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #5
    Yeah, I'm 99% sure that's what the problem is, but they aren't responding to my PMs or emails. :mad:

    Thanks anyway for your help :)
     
    kiteguy123, Nov 11, 2008 IP
  6. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #6
    Do you have any access to SSH? What method of administering the site / db do you have?
     
    jestep, Nov 11, 2008 IP
  7. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #7
    I'm just on a shared hosting plan so no real access. I use cPanel and, mainly, Filezilla.
     
    kiteguy123, Nov 11, 2008 IP
  8. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #8
    Can you access phpmyadmin inside of cpanel?
     
    jestep, Nov 11, 2008 IP
  9. yohanip

    yohanip Well-Known Member

    Messages:
    350
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #9
    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 :)
     
    yohanip, Nov 11, 2008 IP
  10. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #10
    Yeah, I do, but I have no ideas how to use it :eek:
    Any suggestions?
     
    kiteguy123, Nov 11, 2008 IP
  11. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #11
    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.
     
    jestep, Nov 11, 2008 IP
  12. saxDesigns

    saxDesigns Peon

    Messages:
    491
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #12
    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. :D
     
    saxDesigns, Nov 11, 2008 IP
  13. naif

    naif Well-Known Member

    Messages:
    468
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    118
    #13
    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.
     
    naif, Nov 11, 2008 IP
  14. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #14
    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 ;)
     
    kiteguy123, Nov 12, 2008 IP
  15. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #15
    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
     
    olddocks, Nov 12, 2008 IP
  16. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #16
    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.
     
    kiteguy123, Nov 12, 2008 IP
  17. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #17
    yeah! it looks like mysql not running. just ask the hosting provider to restart the server. mysql will be up as well.
     
    olddocks, Nov 12, 2008 IP