1. Please take a little time for this simple survey! Thank you for participating!
    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

    0
     
    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

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    No I havent heard of that from anyone, try changing from "localhost" to 127.0.0.1. See if that changes anything
     
  3. fuzzball

    fuzzball Guest

    0
     
    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

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

    fuzzball Guest

    0
     
    127.0.0.1 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

    0
     
    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

    0
     
    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

    0
     
    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

    0
     
    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

    0
     
    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

    0
     
    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:

    59c732a22d0b26f7
    (these ones work fine with PHP)

    After the upgrade, the passwords look like:

    *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9
    (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

    0
     
    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.
     
Loading...