MySQL: Importing databases from older version
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.