-
close mysql
systemctl stop mysqld.service
-
Block permissions
mysqld_safe --skip-grant-tables &
-
access mysql
mysql -u root
-
Delete empty users
delete from user where user=''';
-
Refresh permissions
FLUSH PRIVILEGES;
-
Restart application
systemctl restart mysqld.service
-
Note: When performing SQL programming under Linux, you need to add a semicolon at the end
;
, otherwise it will think that your operation is not completed and will appear even if you press Enter.->
MYSQL报错:ERROR 1044 (42000): Access denied for user ‘‘@‘localhost‘ to database ‘mysql‘
Guess you like
Origin blog.csdn.net/weixin_45495923/article/details/131630358
Recommended
Ranking