Page 1 of 1

Strange remote connect problem

PostPosted: 15. July 2011 23:08
by bigspring
This is a weird one that I can't work out. It had three guys from Rackspace baffled too, but hopefully somebody out there has an idea what could be wrong.

Until recently I was using an older version of xampp. I can't remember the version but expect it was 1.5.x. Most of my localhost development sites ran off a shared database held on a hosting server. I updated to the latest versions of xampp and all of a sudden I have a problem connecting to one of the servers, our rackspace cloud server.

If I try and connect any of my local sites to my remote database on this server, I get the normal "Database Error: Unable to connect to the database:Could not connect to MySQL" message. If I change the database to a different server, it works fine.

This is the strange part: if I connect using a third party client, such as SQL Workbench / SQLYog, I can connect absolutely fine with all the privileges that I would expect. This proves that the server and mysql are configured to accept remote connections, so why should it be any different for a remote connection when I run through the new version of xampp on localhost? I can't help but think it's related to the hostname my local apache uses but I'm really not sure. Nothing shows up in the mysql logs on the server

Does anyone have any ideas?

Re: Strange remote connect problem

PostPosted: 15. July 2011 23:20
by bigspring
Solved it. I set up a very basic test script to see what the actual php error was, rather than my CMS' basic message.

Code: Select all
mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file


The solution was simple (follow the instructions!), but I still don't understand why this would be a problem using PHP on the new version of xampp and not on the old version. Can anyone make sense of that?

Re: Strange remote connect problem

PostPosted: 16. July 2011 16:11
by WilliL
xampp isn't a program, xampp is a collection of differnt open source programs, where the config files are preconfigured the the you can use the parts.
For me it's the heaven, for I couldn't install the single parts and get them working (Apache, Php, Mysql, Mail). So I can develope local and must not test online.

So each xampp version includes different versions of its components. Thats all ;)