Support » Installing WordPress » Debugging MySQL connection on my own server?

  • I have my own server running RedHat. Apache is running fine, as is PHP and MySQL on various other domains on the server.

    For some reason, though, I can not get the WP Install file to run since it tells me it had trouble connecting to my Database.

    I’m stumped as to what I should look for to determine the actual problem.

    Some more information on our server:
    – Mambo is set up and is running fine with the same config info (localhost name, for instance)
    – Both the DB user for Mambo and the DB user for WP are set up with the same permissions.

    Some things I’ve tried/found:
    – tried using instead of localhost
    – checked the mysql log…no indication of any attempt of a connection from WP
    – checked permissions on the DB user I have set up in WP’s config file (as well as the password)
    – stopped and restarted MySQL on the server

    Is there anyway to get a more specific error out of WP or are there any more obvious things I should be checking for?


Viewing 10 replies - 1 through 10 (of 10 total)
  • Try installing on Mambo’s DB?

    ;o) That’d work, I suppose.

    Well, here’s some more info. I tried running the ‘mysqladmin reload’ command via the command line. I also get an error of there of ‘not allowe to connect via localhost’. So it seems like a permissions issue with something somewhere.

    Where does one grant a user permission to connect to the DB via localhost? I use webmin and it looks like I have the DB user set up for that.

    If you’re asking me, I don’t know. Sorry.

    actually, have you tried going to mysql command line; something like the following
    mysql -u username -p ......

    and then you’ll get the mysql prompt where you could do all mysql command
    mysql> GRANT .....

    Hmm…I can’t get into mysql that way, either. I’m getting 1045 errors no matter which user I try to log in as (even the DB user that Mambo is using…)

    Something is not right on this box.



    I *can* log in if I use the username/pwd that mambo uses. That appears to be the ONLY user that can get into the mysql command line.

    However, even that user can’t log into mysqladmin

    I have a hunch that I need to run ‘mysqladmin reload’ to reset those permissions, but, alas, I have no way to get into mysqladmin. Anyone know of a way to get around this?

    More progress!

    OK, so I went in and remade a completely new user and a completely new DB via Webmin. NOW I can connect and get the installation script to load.

    So far so good.

    However, when I get to step-2, I still get access errors:

    WordPress database error: [Access denied for user: ‘username@localhost’ to database ‘databasename’]
    ALTER TABLE wp_posts ADD INDEX ( post_name )

    The user I am using right now has ALL permissions. I’ve set the db to grant this users ALL permissions as well.

    Stumped again. 😉

    A clarification…it still creates all the tables, I just get the access denied for each table when ALTERing them by the ADD INDEX command.

    AND, it appears that everything works. Ie, I can now log in as admin, and create a new post, and it shows up.

    So…are those red herring errors, or is something going to break down the road?

    Without index, finding data in database takes more time. Meaning, your website may take longer to load completely.

    Well, how important is the index when running WordPress? Is it a nicety that you’d notice a bit of speed increase on a hugely succesful blog or is it of vital importance that even the most obscure blog will need/want to have for it to run decently?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Debugging MySQL connection on my own server?’ is closed to new replies.