Answer the question
In order to leave comments, you need to log in
How to login from console to mysql if no password has been set?
Hello! How to login in terminal to mysql if no password has been set.
I do this: mysql -u root -p
and at the invitation to enter the password, just enter. Answer:
Access denied for user 'root'@'localhost' (using password: NO)
Answer the question
In order to leave comments, you need to log in
# kill the running mysql process
sudo service mysql stop
# start mysql in safe mode and skip grant tables
sudo mysqld_safe --skip-grant-tables --skip-networking &
# log in with root
mysql -u root
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question