Reputation: 141
I have two servers, Host1 and Host2. Host1 is running MySQL (Server version: 5.0.77-log Source distribution) and Host2 is running (Server version: 5.5.56-MariaDB MariaDB Server).
I'd like to replicate a password from Host1 to Host2 but not sure if the hashing use on MySQL is the same as MariaDB. As a test, I created a test user on both boxes and set the password to 'password' and looked at their respective hashes, the output is as follows:
Host1: 7CA5A808FD8ABA5A611721BFC681BF3B
Host2: 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
I've looked through the documentation for both MySQL and MariaDB but cannot find the default encryption method they both use. Is it MD5, SHA1 etc, any help would be great.
Upvotes: 2
Views: 3877
Reputation: 2478
As far as I know, MariaDB and MySQL use the same password hashing currently. Check
https://mariadb.com/kb/en/library/password/
https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
But as far as I see the first password looks like it was produced by old MySQL version password hashing algo (the one that could be obtained by OLD_PASSWORD()). So if your MySQL server used the new password hashing algo you could just copy values from mysql.user
, but as it's not your case, you'll have to manually change passwords of users you want to migrate.
Upvotes: 2