I installed mysql on my Debian server. I couldn't get into the database because it kept saying I put in the wrong password so I looked on the internet and found that I could log onto mysql using the command sudo mysql --defaults-file=/etc/mysql/debian.cnf
From there I went typed use mysql;
then mysql> UPDATE user SET password=PASSWORD('password') WHERE user='root';
Which I know switched the password because I typed the command select Host, User, Password from user;
And it showed the encrypted characters had changed for all three of the root user categories.
But I am still not able to login to mysql using mysql -u root -p
Add a comment
|
You probably need to run FLUSH PRIVILEGES
.
Though I'd recommend changing your password using mysqladmin --defaults-file=/etc/mysql/debian.cnf password