• Resolved pbasehore

    (@pbasehore)


    My wp-config.php file won’t let WP connect to my DB. I’ve confirmed all of my settings, but it still won’t cooperate.

    The webserver and DB server are all separate machines, controlled by me (this is an internal corporate site). I can connect just fine using MySQL Workbench, but the same username/dbname/password/ip settings in my wp_config just doesn’t work.

    I’ve tried allowing WP to create it’s own config, just in case, with no dice.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pbasehore

    (@pbasehore)

    I just wrote a quickie php script to see if the issue is with WP or php, somehow.

    <?php
    
    $db=@mysql_connect('<IP Address>', '<username>', '<password>');
    if (!$db) echo "connection failed";
    else echo "connection succeeded";
    
    ?>

    Unfortunately, it always says connection failed — even if I put root permissions in there.

    Yet, as before, MySQL Workbench connects flawlessly. What am I missing?

    Thread Starter pbasehore

    (@pbasehore)

    Aha! Bloody SELinux on my WP Server was the culprit. Poorly-worded error messages from PHP/MySQL notwithstanding…

    Hi,

    Not sure if this is the same problem but I ended up deleting my last wp install after backing up all pages and posts. I tried so many fixes after reading this forum.
    WordPress News was not loading, anything to do with themes or plugins I was just getting a blank page.
    I tried renaming plugins, deleting plugins, deactivating plugins and themes also tried config changes. But nothing worked so I backed up and deleted.
    I have now performed a new install and guess what the same problems still persist?
    I have no idea what is going on and I have contacted my host Arvixe but they are not to good with WordPress fixes.
    Any info or advice would be very much appreciated..

    Regards & thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't connect to DB’ is closed to new replies.