1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Mysql4 (ART) Problem with localhost connections

Discussion in 'Plesk for Linux - 8.x and Older' started by fuzzball, Nov 16, 2005.

  1. fuzzball

    fuzzball Guest

    I'm having a problem that's driving me absolutely insane. I've installed the latest rpm's for mysql 4.1.15 from Atomic Rocket Turtle. Running plesk 7.5.4

    I can not get php scripts to connect to any databases. When I try to connect to these same DB's through the phpmyadmin in plesk, or from the command line, they connect and work fine. But when using any php script installed on a domain by a user, they all say they can't connect, with the exact same DB, username, password, and "localhost" as the database host.

    Has anyone seen this before? I'm pulling my hair out trying to figure out whats going on and give my customers a reasonable explanation as well.
  2. atomicturtle

    atomicturtle Golden Pleskian

    Nov 20, 2002
    Likes Received:
    Washington, DC
    No I havent heard of that from anyone, try changing from "localhost" to See if that changes anything
  3. fuzzball

    fuzzball Guest

    Nope, it gives me the same thing. Still can't connect.

    I can't figure out what might be going on. I've got 2 other servers with the ART mysql rpm's installed and they've always worked fine.

    The only difference is that the other servers are running earlier versions of mysql4. On this one I tried to install the latest version available on your site. I tried "downgrading" to the same mysql version I have on the other servers, also using your rpm's, but then mysql fails to start until I put the last version back again.
  4. ShadowMan@

    ShadowMan@ Guest

    What are the contents of your /etc/hosts file?
  5. fuzzball

    fuzzball Guest

 localhost.localdomain localhost
    69.57.xxx.xxx admin.mydomain.com admin

    The second IP is of course my IP and domain, not X's. :)
  6. acidbox

    acidbox Guest

    can you login to mysql from the command line?

    mysql -u yourname -p

    if so, then it might be an issue with php
  7. fuzzball

    fuzzball Guest

    yes, I can log in from the command line. I was also thinking it must be some setting that's off in PHP, but I don't know what. I've tried looking through the php.ini file, but didn't see anything that looked out of the ordinary. I also cross checked it with my other servers and everything seems to match up.

    Luckily, it's a new server with only a couple of clients on it that I can move to another machine. I'm pretty close to just moving the existing clients off and having the machine wiped and re-installed.
  8. bambam4479

    bambam4479 Guest

    I'm seeing the same problem, but can connect fine from one domain but not any others that are on the server. I can connect via command line as acid box suggests, just not from web.
  9. bambam4479

    bambam4479 Guest

    I was able to fix the problem by following bram's instructions in this thread

    Edit: In hindsight, I suspect that adding old_passwords=1 to the my.cnf would have fixed things as suggested here
  10. fuzzball

    fuzzball Guest

    You are the freakin man! :)

    I added the old_passwords line into the my.cnf and restarted mysqld and httpd. At first it didn't seem to work.

    I tried removing the db user and putting it back in, but that also didn't work.

    Finally, deleted the whole database, and recreated it and now it's working. I also tried (several times) to delete the database and recreate it before putting in the old_passwords line and that didn't work...So I know for sure that's what did it.

    Thanks so much for the help. You saved me a hell of a lot of work.
  11. koalatxu

    koalatxu Guest

    I seem to have found something that may be useful to the people that know more about this.

    I upgrade mysql to 4.1.15 and have the same problem, but only with new DB users added in plesk.

    In the mysql.user table, the password was (for the users before the upgrade) like this:

    (these ones work fine with PHP)

    After the upgrade, the passwords look like:

    (these ones don't work with PHP)

    I will now try the suggestions from bambam4479 and I will let you know how I went.
  12. jaime

    jaime Guest

    That version of Mysql 4.1.15 from Art encrypts the Database Users password in a 32 bit. We were having the same problem, but I figured it our when I create a user through shell.