• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Mysql4 (ART) Problem with localhost connections

F

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.
 
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.
 
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. :)
 
can you login to mysql from the command line?

mysql -u yourname -p

if so, then it might be an issue with php
 
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.
 
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.
 
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
 
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.
 
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.
 
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.
 
Back
Top