mysqladmin ping works, but WP can't connect (3 posts)

  1. plindberg
    Posted 11 years ago #

    Our server runs several separate MySQL servers, each listening to its own port and socket.

    Doing a mysqladmin -S /tmp/mysql-oopsblog.sock -u root -p ping and supplying the password returns "mysqld is alive".

    DB_USER is "root", DB_PASSWORD is the same I enter to mysqladmin, and I've tried the following DB_HOST settings:

    * localhost:4003 (the port mysqld listens to)
    * localhost:/tmp/mysql-oopsblog.sock
    * :/tmp/mysql-oopsblog.sock

    None of them work. Any ideas?

  2. plindberg
    Posted 11 years ago #

    Forget it. I found it. Details in the next reply.

  3. plindberg
    Posted 11 years ago #

    The main reason this didn’t work was the combination of PHP version and MySQL version. The MySQL version is 4.1.7, and PHP's is 4.3.2. This PHP version uses the old password hashing format, so I had to do a mysqladmin ... old-password mypasswd.

    After changing this, a DB_HOST setting of 'localhost:/tmp/mysql-oopsblog.sock' works. But in order to specify the port, one needs to enter ''. If one uses 'localhost', PHP for some reason tries to connect to the wrong socket.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.