MySQL: Importing databases from older version I'm in the process of moving everything from a very old production server to a new one. I'm now trying to copy the MySQL database over to the new system. I have very limited knowledge of MySQL, BTW. First some version info:

Old server:

$ mysql -V
mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2


New server:

$ mysql -V
mysql  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


On the old server, I made a dump of all databases first:

mysqldump -u root -p --all-databases &gt; all_databases.sql


Then on the new server, I imported the databases with:

mysql -u root -p &lt; all_databases.sql


But now, when I try to run mysql, I get an error:

$ mysql
ERROR 1275 (HY000): Server is running in --secure-auth mode, but 'root'@'localhost' has a password in the old format; please change the password to the new format


So apparently it has overwritten the user database as well (I really had no idea that would happen, but, you know, limited MySQL knowledge...).

So how can I fix this?
Writing out @Akina's suggestion: 


Edit your MariaDB server options file, which I think is it at /etc/mysql/my.cnf on Debian. In the [mysqld] section, add this line: secure_auth=OFF 
Restart MariaDB server: systemctl restart mariadb (assuming you have systemd)
You should now be able to log in using the mysql client and run something like: SET PASSWORD = password('your_new_password'); Alternatively, run mysql_secure_installation from the command-line.
Edit the MariaDB server options file again and remove the line you inserted before, then restart the MariaDB server, and everything should be working, hopefully.