After installing MySQL with sudo apt-get install mysql-server mysql-common
command on Ubuntu, there is no prompt for password during installation. Then use mysql -u root -p
to log in, and then ask for a password, but no matter how you enter it, it prompts that the password is wrong. How to solve it?
The plan is as follows:
mysql -u debian-sys-maint -p
to log in.set password for'root'@'localhost' = password('yourpass');
After the modification, MySQL should be operated normally.Recommended Posts