I have mysql 8.0 work under centos 7 minimal.
I change the password using this command mysqladmin -u root -p'Pass-123***' password Myp@$$123
.
After this , i try to access to mysql via mysql -p
but i cannot access with the new password.
How i can do this ?
Advertisement
Answer
You changed the password commandline on Linux. In sh/bash/zsh the dollarsign has a reserved meaning, so omitting quotes around a string containing them would make the shell interpret them and update the password with whatever the outcome is from that.
What you could do is try is to put the “password” as a parameter in the mysql commandline:
mysql -u root -pMyp@$$123
If this works, just rerun the mysqladmin command and change the password this time including quotes around the new password.