mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
Reset it with the following steps
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#Stop mysql service /etc/init.d/mysql stop #Start the MySQL server w/o password mysqld_safe --skip-grant-tables & #Connect to the MySQL server without password mysql -u root #Set a new MySQL root user password mysql> use mysql; mysql> update user set password=PASSWORD("NEW-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit #Stop mysql service /etc/init.d/mysql stop #Start mysql service /etc/init.d/mysql start #now you can login with password mysql -u root -p |