For old password compatibility, do
SET GLOBAL old_passwords = 1;
SET PASSWORD FOR 'repl'@'%' = PASSWORD('the_password');
SET GLOBAL old_passwords = 0;
We can also try SET GLOBAL secure_auth=OFF; however I found this made no difference when running MariaDB 10.5 and attempting to connect with an old (presumable 4.1) client.