Debugging MySQL connection on my own server? (11 posts)

  1. aluminum
    Posted 10 years ago #

    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?


  2. Joshua Sigar
    Posted 10 years ago #

    Try installing on Mambo's DB?

  3. aluminum
    Posted 10 years ago #

    ;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.

  4. Joshua Sigar
    Posted 10 years ago #

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

  5. Joshua Sigar
    Posted 10 years ago #

    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 .....

  6. aluminum
    Posted 10 years ago #

    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.

  7. aluminum
    Posted 10 years ago #



    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?

  8. aluminum
    Posted 10 years ago #

    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. ;)

  9. aluminum
    Posted 10 years ago #

    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?

  10. Joshua Sigar
    Posted 10 years ago #

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

  11. aluminum
    Posted 10 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic