UiCvA0wH
2017-01-11 19:12:05

mysql ERROR 1045 (28000): Access denied for user 'newuser'@'localhost' (using password: NO)


$ service mysql restart --skip-grant-tables --skip-networking

$ mysql

mysql> SELECT user,host FROM mysql.user WHERE user='olduser';

mysql> SELECT user,host FROM mysql.user;

mysql> UPDATE mysql.user SET user='newuser' WHERE user='olduser';

mysql> exit

$ service mysql restart