Support » Installing WordPress » wordpress and mysql 4.1.x

  • hi! i’m trying to setup wordpress to work with mysql 4.1.x and i’m just running into lots of problems. i’ve been busy hacking away at the source trying to get it to work with mysql but it’s only slightly working (can connect and run a few thigns) and can’t get the install to finish.
    is there a better way to get wordpress working with mysql 4.1.x? or anyone have a hacked filed that i could use? thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • ok i did some research and found out that when using mysql 4.1.x, passwords are hashed differently than older versions and hence mysql_connect() won’t work.
    however, if you run this code:
    ) WHERE User = ‘some_user’
    this will setup up an account that uses the old styled passwords. then you can use this account in wordpress and the old mysql_connect(). otherwise, you need to use mysqli_connect() and update all of the connections to use the new interface. hope this helps someone, took me 2 days to figure out!

    oh after doing that, you needed to got into the wp-db.php file, change the mysql_connect line to:
    $this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword,$dbname);
    and then comment out: //$this->select($dbname);
    then everything worked, mysql 4.1.x and PHP 5.0.1 yay!

    hmmm looks like you don’t need to comment out that line after all. first time it did work, second time it didn’t. something screwy going on there.

    If you have control of the MySQL server (you’re the system administrator or have your own instance of MySQL), you can force it to use the old-style password hashes by adding old-passwords to my.cnf/my.ini or using the --old-passwords command line option when starting the server. This allows WordPress to run unmodified, but you’ll lose the security benefit of the new password hashes.
    From reviewing the password changes in MySQL 4.1.1 and later, another workaround may be to create the database user with a MySQL 4.0 client, which will use the old hash for the password. If that password gets changed by a 4.1.x client later, the password is hashed the new way and will cause WordPress to break.
    The new MySQL calls in PHP 5 support new-style passwords, but WP’s support for PHP 5 is a work in progress– Try a nightly build if you’re feeling adventurous.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wordpress and mysql 4.1.x’ is closed to new replies.