• Seen this title a lot in the forum, but the answers to other people’s problems haven’t helped me.
    I’m trying to install WordPress on my local PC. I like what I’ve seen and read about WP, so I wanted to test it thoroughly and attempt adapting it to my site locally before uploading it.
    My setup is:
    Win2000 SP4
    Apache 1.3.20
    PHP 4.3.9
    MySql 4.1
    WordPress 1.2.1
    I used MySQLAdministrator 1.0 to snoop around the database. Nowhere did I find what wp-config.php calls a database name. So I assumed what was wanted is what MySQLAdministrator calls a schema. I setup a schema called wordpress. Then I setup a user called admin_de, and granted all database privileges on wordpress to admin_de. Then I filled in wp-config.php as follows:
    define('DB_NAME', 'wordpress');
    define('DB_USER', 'admin_de');
    define('DB_PASSWORD', '****');
    define('DB_HOST', 'localhost');

    Needless to say, this didn’t work, which is why I’m writing this post. I also tried root and the original MySql password, but this didn’t work either. When installing MySql I had chosen Latin-1 encoding and ISAM tables. Was this wrong? Should it be UTF-8?
    I would be very grateful for any help

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter antoine

    (@antoine)

    Thanks, Error. I tried as you suggested using the MySql Command Line Client. The commands were all OK, but still the same error-message.
    The commands are probably the same as what I was doing using MySQLAdministrator.

    Now that I think about it, I think that should read instead:
    GRANT ALL PRIVILEGES ON wordpress TO 'admin_de'@'localhost'
    IDENTIFIED BY '****' WITH GRANT OPTION;

    Thread Starter antoine

    (@antoine)

    Sorry, no, didn’t make any difference.

    Moderator James Huff

    (@macmanx)

    Chances are, you have the DB_Host wrong. Do you know what the host is for your MySQL database? Contrary to the documentation, 99% of the time, it’s NOT “localhost”.

    Thread Starter antoine

    (@antoine)

    Thanks for trying, MacManx. I tried: localhost, 127.0.0.1, my PC’s network ID and the IP address that ipconfig gave me. All to no avail.
    Having now had a night’s sleep in between, I feel the “famous 5 minute install” is a bit of an exaggeration.

    Could this be an IIS issue ?
    Doesn’t Win2K run IIS by default ?
    I know that trying to get Xampp running on an IIS machine can be problematic.

    Thread Starter antoine

    (@antoine)

    Thanks, Podz. No, I deinstalled IIS years ago so as to concentrate on Apache. I don’t think there’s a problem here.

    https://www.apachefriends.org/en/xampp-windows.html
    I use xampp without any issues at all for wp test installs and other programs (such as mediawiki) – it’s an integrated package, and if you get the installer versions, it’s a one-click install.
    Versions after 1.4.4 have php5 which will cause an error about ‘StdClass’ – someone has sorted that here though but I forget the thread.
    I have 1.4.4 which you could ftp from me if you wanted.
    Is altering your setup an option ? (I don’t know what else you have running).

    Thread Starter antoine

    (@antoine)

    Hi Podz,
    I don’t really want to start all from scratch by installing a new XAMPP. May ruin other things which have run until now, in particular I don’t want any dependancy on Apache 2.
    However I did just take up your idea and downloaded phpMyAdmin2.6.0. I don’t know this tool, but I got an ominous
    #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client
    when I entered the same parameters I am using for WP (the “protocol” in question was config).
    I just don’t understand this – MySql is up and running as a service, it is accessible to MySql Command Line Client and to MySQLAdministrator.

    I’m in the middle of an install – actually my install went fine – but I’m setting up WordPress on my workstation so I have a staging environment – which is where I ran into the same problem you describe.
    Well, I was unable to solve the problem, but after some digging on Google, I installed MySql v4.0.22 instead of 4.1 and the problem went away. Other people described the problem as some sort of incompatibility between PHP & MySql & login methods – but I didn’t really get into it.
    If you can reinstall MySql, you may be able to get this to work.
    The install for MySql 4.0 is not nearly as painless as the 4.1 install – but I did manage to get it working.
    Good luck!
    -adam

    UPDATE mysql.user SET Password = OLD_PASSWORD(‘your password’)
    WHERE Host = ‘your server’ AND User = ‘user_name’;
    FLUSH PRIVILEGES;

    MySQL client must be 4.1

    Thread Starter antoine

    (@antoine)

    Just revisiting this thread after seeing it mentioned on the WordPress Codex.
    Having acquired a new computer, Windows XP-Pro and new installations of everything, I was running into the same problems again with my staging system.
    shaken is right: the encryption of MySql passwords has changed as of MySql 4.1 and can no longer be understood by the PHP mysql extension. By following shaken’s suggestion, backed up by the MySql documentation, my local WordPress is running smoothly with MySql 4.1.10

    Wished I had found this thread 24hrs ago…. would have saved me hours of grief…. AS I was in the same boat. But, I followed podz’s XAMPP (milli danke for that podz!) directions & no longer have any problems. I’m not keen on the directory struture, but I can always re-do it again later, now that I know what’s going on….. and that would explain the error messages I was getting trying to connect….

    Tg

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Error establishing a database connection!’ is closed to new replies.