• elle

    (@elle)


    I am having trouble installing wp on my website. I have set up the mysql database, and have changed my config file, but I keep getting thefollowing error message:

    <i>Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at DB_HOST.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?</i>

    I double checked my setting in the config file, and they are correct. Then I ran the following script to see if it was a database problem, as referenced in a previous thread.

    <?php
    $link = mysql_connect(‘localhost’, ‘mysql_user’, ‘mysql_password’);
    if (!$link) {
    die(‘Could not connect: ‘ . mysql_error());
    }
    echo ‘Connected successfully’;
    mysql_close($link);
    ?>

    I was able to connect to the database with no problem — I got the message “connected successfully”. Then I triple checked to make sure I had the same configuration parameters in both files, and I did.

    So why can’t I install?

    the revelevant URL is https://je.operaglasses.org

Viewing 10 replies - 1 through 10 (of 10 total)
  • unit12

    (@unit12)

    I wanted to second elle’s issue, which I’ve encountered when performing a test installation on my PowerBook.

    FYI, I’ve installed MySQL 4.1.10 using the installer from mysql.com. I’m in the process of downloading 4.0.x to see if there’s any difference, as well as the MAMP distribution mentioned in another thread.

    Moderator James Huff

    (@macmanx)

    Unit12, have a read through this: https://maczealots.com/tutorials/wordpress/

    unit12

    (@unit12)

    The problem doesn’t occur when I connect to a 4.0.23 database; installation is the normal 5-minutes.

    Out of curiousity, I tried using YourSQL and CocoaMySQL, and neither of them were able to connect. However, the standard mysql command line utilities worked fine.

    So, my guess is that the shared libraries installed on my system aren’t updated for MySQL 4.1. I assume this might be your problem as well, elle.

    macmanx: I saw the link in the other thread, and am about to try it out. Seems like an easier development environment. Thanks.

    unit12

    (@unit12)

    A little more searching and I found the exact culprit. MySQL 4.1.1+ uses a different password hashing scheme, incompatible with older clients. There’s a post on the manual page about this, which mentions problems with PHP 4.3.9:

    https://dev.mysql.com/doc/mysql/en/old-client.html

    Thread Starter elle

    (@elle)

    I’m not using a Mac, and I’ve installed earlier versions of wordpress on my site without any problems.

    How can I check to see what version of mySQL I’ve got?

    johnscarry

    (@johnscarry)

    I’m just learning , so I could be wrong, but on my machine, at the terminal prompt > I type mysql
    It looks like this:
    Welcome to Darwin!
    machine:~ jscarry$ mysql

    The machine responds with
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 327728 to server version: 4.0.18

    Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

    mysql>

    My version number is 4.0.18

    johnscarry

    (@johnscarry)

    I use CocoaMySQL to connect to my databases and just noticed that the browser window has the location and version number at the top. It turns out I have slightly different versions 4.0.18 on two machines and 4.1.10-max on another.

    If you are not using a Mac, I’m sure that there are clients out there that give the same info.

    gatecrasher

    (@gatecrasher)

    having the same problem, figure it out yet?

    theboywonder

    (@theboywonder)

    Or you can access phpMyAdmin via your webhosts control panel and it will tell you – must easier for novices ??

    For example, accessing phpMyAdmin on my home server (not my webpage), at the top it says:

    Welcome to phpMyAdmin 2.6.1

    MySQL 4.1.10 running on localhost as root@localhost

    Thread Starter elle

    (@elle)

    Okay, I’m running MySQL 4.0.20. Is this why I’m having trouble installing? Help!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cannot Connect to Database’ is closed to new replies.