Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql password hashing method old vs new
    primarykey
    data
    text
    <p>I'm trying to connect to a mysql server at dreamhost from a php scrip located in a server at slicehost (two different hosting companies). I need to do this so I can transfer new data at slicehost to dreamhost. Using a dump is not an option because the table structures are different and i only need to transfer a small subset of data (100-200 daily records) The problem is that I'm using the new MySQL Password Hashing method at slicehost, and dreamhost uses the old one, So i get </p> <pre><code>$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) </code></pre> <p>facts: </p> <ul> <li>I need to continue using the new method at slicehost and i can't use an older php version/library</li> <li>The database is too big to transfer it every day with a dump</li> <li>Even if i did this, the tables have different structures</li> <li>I need to copy only a small subset of it, in a daily basis (only the changes of the day, 100-200 records)</li> <li>Since the tables are so different, i need to use php as a bridge to normalize the data</li> <li>Already googled it</li> <li>Already talked to both support stafs</li> </ul> <p>The more obvious option to me would be to start using the new MySQL Password Hashing method at dreamhost, but they will not change it and i'm not root so i can't do this myself.</p> <p>Any wild idea?</p> <p>By VolkerK sugestion:</p> <pre><code>mysql&gt; SET SESSION old_passwords=0; Query OK, 0 rows affected (0.01 sec) mysql&gt; 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) </code></pre> <p>The obvious thing now would be run a mysql> SET GLOBAL old_passwords=0; But i need SUPER privilege to do that and they wont give it to me</p> <p>if I run the query</p> <pre><code>SET PASSWORD FOR 'nodari'@'HOSTNAME' = PASSWORD('new password'); </code></pre> <p>I get the error</p> <pre><code>ERROR 1044 (42000): Access denied for user 'nodari'@'67.205.0.0/255.255.192.0' to database 'mysql' </code></pre> <p>I'm not root...</p> <p>The guy at dreamhost support insist saying thet the problem is at my end. But he said he will run any query I tell him since it's a private server. So, I need to tell this guy EXACTLY what to run. So, telling him to run</p> <pre><code>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'; </code></pre> <p>would be a good start?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload