在linux系统中登录mysql时出现Enter password: ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)的解决办法

  在一次使用mysql数据库是出现了这种错误,于是乎去百度看了很多博文踩了很多坑,最终解决了问题,分享给大家。

转载与:https://blog.csdn.net/css33/article/details/93233590

问题截图:

 问题解决步骤:

1:

使用sudo mysql -u root -p登录Mysql

 成功登录mysql

步骤2:查看数据库

 步骤3 :选中mysql中的User

 步骤4:更改root用户的密码

update mysql.user set authentication_string=PASSWORD('xxx'),plugin='mysql_n
ative_password' where user='root'; 

步骤5:刷新数据库,并重启数据库服务

flush privileges;

service mysql restart;

这样问题就解决啦,解决后的截图

笨鸟先飞
原文地址:https://www.cnblogs.com/zoutingrong/p/14499563.html