I am trying to connect to mysql server in dreamhost from a php script located on slicehost server (two different hosting companies). I need to do this so that I can transfer new data to slicehost in dreamhost. Using a dump is not an option, because the table structures are different, and I need to transfer only a small data set (100-200 daily entries) The problem is that I use the new MySQL password hashing method on slicehost, and dreamhost uses the old one, so I get
$link = mysql_connect($mysqlHost, $mysqlUser, $mysqlPass, FALSE); Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication Warning: mysql_query() [function.mysql-query]: Access denied for user 'nodari'@'localhost' (using password: NO)
facts:
- I need to continue using the new method in slicehost and I cannot use the older php version / library
- The database is too large to be transferred every day with a dump
- Even if I did this, tables have different structures.
- I need to copy only a small subset, daily (only day changes, 100-200 records).
- Since the tables are so different, I need to use php as a bridge to normalize the data.
- Already sent to Google.
- Already spoken with both supporting files
A more obvious option for me would be to start using the new HTML Password Hashing method in dreamhost, but they won’t change it and I’m not root, so I can’t do it myself.
Any wild idea?
Posted by VolkerK sugestion:
mysql> SET SESSION old_passwords=0; Query OK, 0 rows affected (0.01 sec) mysql> SELECT @@global.old_passwords,@@session.old_passwords, Length(PASSWORD('abc')); +------------------------+-------------------------+-------------------------+ | @@global.old_passwords | @@session.old_passwords | Length(PASSWORD('abc')) | +------------------------+-------------------------+-------------------------+ | 1 | 0 | 41 | +------------------------+-------------------------+-------------------------+ 1 row in set (0.00 sec)
The obvious thing will now be mysql> SET GLOBAL old_passwords = 0; But I need the SUPER privilege to do this, and they won’t pass it on to me.
if i run the request
SET PASSWORD FOR 'nodari'@'HOSTNAME' = PASSWORD('new password');
I get an error
ERROR 1044 (42000): Access denied for user 'nodari'@'67.205.0.0/255.255.192.0' to database 'mysql'
I'm not root ...
The guy in support of dreamhost insists on saying that the problem is at my end. But he said that he would fulfill any request that I tell him, since this is a private server. So, I have to tell this guy EXACTLY what to run. So, asking him to run
SET SESSION old_passwords=0; SET GLOBAL old_passwords=0; SET PASSWORD FOR 'nodari'@'HOSTNAME' = PASSWORD('new password'); grant all privileges on *.* to nodari@HOSTNAME identified by 'new password';
will be a good start?
php mysql password-hash mysql-error-1044
The Disintegrator Dec 12 '09 at 6:59 2009-12-12 06:59
source share