• Hi,

    I’ve been trying to get latest word press installed on a box with MySQL 4.1.14. And I’ve been getting the “can’t connect to database” error. After triple checking values, connecting to DB via ‘mysql’ on cmd line I did bit of research and found there is the issue with the MySQL password hash being increased from 16 to 41 bytes in 4.1.N.

    Does anyone know if this is fixed yet? (If Word Press can handle it, or use the mysqli PHP lib at all??)

    I have a hosting package where by I cannot login to mysql and issue the SET PASSWORD = OLD_PASSWORD(‘password’) command, and I’ve read that fixes it, so I’m a bit stuck.

    Kinda about to switch to textpattern unfortunately cos all other blogs I work with are Word Press but it seems like it’s a bit of a shortcoming.

    Any news on when this may be sorted?

    Thanks

    Simon Kittle

Viewing 9 replies - 1 through 9 (of 9 total)
  • Not seen this reported before – the mysql version thing.

    What is this ‘box’ ? A remotely hosted server ?

    ‘Latest wordpress’ – you mean 1.5.2 ?

    If your host is using PHP 4.0 with MySQL 4.1, then TextPattern won’t work either with that same fix applied. It has nothing to do with WordPress itself.

    Taken from:
    https://dev.mysql.com/doc/refman/4.1/en/old-client.html

    Follow the instructions on the link above. If you’re having trouble on a localhost windows box, you can run the following from dos:

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('your_password') WHERE Host = 'localhost' AND User = 'root';
    mysql> FLUSH PRIVILEGES;

    Thread Starter sikittle

    (@sikittle)

    “box” – yes, as in just general name for computer server. Yes it’s remotely hosted.

    I know it’s not a Word Press issue as such, but word press uses the ‘mysql’ library. There is a newer ‘mysqli’ library which will support the new password hashing mechanism, so any software that is capable of using that will be okay – so I’d imagine that something using the PEAR database abstraction layer would be okay.

    I don’t know if Textpattern uses that – but on one of the posts I saw that a person experiencing the same problem had it solved by switching.

    Thanks for the MySQL statement also. However, as I said in the post, I’ve tried updating the password with the OLD_PASSWORD() hashing mechanism and it doesn’t work because I don’t have priviledges to update the user like that. I don’t have root on the mysq server so I’m aware it can be fixed like this, but only for people who are running their own servers.

    sikittle: WP does not use the “mysql” library, PHP does. WP (indeed, any PHP code) accesses whatever library that PHP has installed (or is compiled with) to connect to databases. So TextPattern will also use the “mysql” library, since that library is specific to the PHP engine itself. Applications get no choice in the matter if they want to connect to MySQL through PHP.

    if your host is using PHP 4.0 (or lower) and MySQL 4.1 (or higher), they *must* have a mechanism for letting client applications login, or no PHP code at all would be able to do it, including WordPress, TextPattern, phpBB, phpMyAdmin, etc.

    Thread Starter sikittle

    (@sikittle)

    RustIndy: I’m sorry, maybe I wasn’t clear. By “mysql library” I mean the set of mysql functions in PHP which WP does use. See here:
    https://uk.php.net/manual/en/ref.mysql.php

    But PHP also has the “mysqli” “library” (extension, set of functions, whatever you want to call it.) See here

    https://uk.php.net/manual/en/ref.mysqli.php

    These allow access new functionality in MySQL 4.1 and above (and as with this case, the new password hashing mechanism).

    PHP also has the PEAR::DB layer which any client program can use which will use the appropriate underlying set of PHP functions, or any given C extension to PHP which may allow access to databases PHP doesn’t natively support.

    By “mysql library” I didn’t mean the low level C library that PHP is compiled against. Sorry for the confusion.

    Thread Starter sikittle

    (@sikittle)

    RustIndy: I’m sorry, maybe I wasn’t clear. By “mysql library” I mean the set of mysql functions in PHP which WP does use. See here:
    https://uk.php.net/manual/en/ref.mysql.php

    But PHP also has the “mysqli” “library” (extension, set of functions, whatever you want to call it.) See here

    https://uk.php.net/manual/en/ref.mysqli.php

    These allow access new functionality in MySQL 4.1 and above (and as with this case, the new password hashing mechanism).

    PHP also has the PEAR::DB layer which any client program can use which will use the appropriate underlying set of PHP functions, or any given C extension to PHP which may allow access to databases PHP doesn’t natively support.

    By “mysql library” I didn’t mean the low level C library that PHP is compiled against. Sorry for the confusion.

    Yes, I meant the same thing. The “mysql” and “mysqli” modules can either be loaded as libraries or compiled into PHP. Even PEAR uses them. PHP *has* to have a database module loaded in order to use that database (at least as of v4.0 – MySQL was built-in at that point, as well as ODBC in Windows). WP, doesn’t use PEAR, but the database library it does use is still limited to whatever database modules PHP loads itself. If “mysqli” isn’t loaded by PHP, then PEAR (and WP, in this case) cannot use it’s functions. Actually, I’m not even sure WP can use “mysqli” at all…

    Anyhow, what I’m trying to ask is what version of PHP you’re using. If it’s PHP 4.0, then you’ll have problems unless PHP was compiled using the MySQL library included with MySQL 4.1 – the MySQL client library that’s included with PHP 4.0 will not work with MySQL 4.1 and higher, unless MySQL is using the old password fix.

    Thread Starter sikittle

    (@sikittle)

    Yeah okay. There is PHP 4 and PHP 5 on the server.

    I suppose my point is I think the only issue is the password thing, simply if the password would get through the rest would be okay as others have reported. So it’s a shame that WP hasn’t got the mysqli functionality yet, or PEAR support which would give it that. (I think lates PEAR :DB uses these extensions).

    I understand what you mean about the compilation.

    I think my point was that with WP using the mysql functions – there’s no way to make it work even with the right library compiled in because it uses the older functions.

    Anyway, it’s all irrelevant now because I dumped that hosting account ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘With MySQL 4.1.N and the new password thing, sorted?’ is closed to new replies.