一,问题描述:

MysqlERROR1698(28000)解决,新装了mysql-server-5.7,登录为这一问题,普通用户不能进mysql,只有root用户才能进,并且不需要任何密码。

~$ mysql -u root -p

Enter password:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

二,解决步骤:

停止mysql服务

~$ sudo service mysql stop

以安全模式启动MySQL

~$ sudo mysqld_safe --skip-grant-tables &

MySQL启动之后就可以不用密码登陆了

~$ mysql -u root

Welcome to the MySQL monitor. Commands end with ; or g.

Your MySQL connection id is 2

Server version: 5.7.10 MySQL Community Server (GPL)

查看一下user表,错误的起因就是在这里, root的plugin被修改成了auth_socket,用密码登陆的plugin应该是mysql_native_password。

mysql> select user, plugin from mysql.user;

+-----------+-----------------------+

| user | plugin |

+-----------+-----------------------+

| root | auth_socket |

| mysql.sys | mysql_native_password |

| dev | mysql_native_password |

+-----------+-----------------------+

3 rows in set (0.01 sec)

关于auth_socket,在官方有说明: https://dev.mysql.com/doc/mysql-security-excerpt/5.5/en/socket-authentication-plugin.html ,反正现在暂时不用它, 那就把这里改了。

mysql> update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root';

Query OK, 1 row affected, 1 warning (0.00 sec)

Rows matched: 1 Changed: 1 Warnings: 1

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

重启服务,问题就解决了

~$ sudo service mysql stop

...

* MySQL Community Server 5.7.10 is stopped

~$ sudo service mysql start

..

* MySQL Community Server 5.7.10 is started

~$ mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or g.

Your MySQL connection id is 2

Server version: 5.7.10 MySQL Community Server (GPL)

28000 mysql_MysqlERROR1698(28000)解决相关推荐

  1. error 1309 mysql_MySQ登录提示ERROR 1045 (28000)错误如何解决

    我们在登录mysql的时候,会经常出现错误,本文主要为大家详细介绍了MySQ登录提示ERROR 1045 (28000)错误的解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望能帮助到大 ...

  2. mysql error1045 yes,MySQLERROR1045(28000)错误的解决办法

    错误现象: ERROR 1045 (28000): Access denied for user'ODBC'@'localhost'(using password: NO) ERROR 1045 (2 ...

  3. mysql 1045错误ODBC_MySQL ERROR 1045 (28000) 错误的解决办法

    错误现象: ERROR 1045 (28000): Access denied for user'ODBC'@'localhost'(using password: NO) ERROR 1045 (2 ...

  4. mysql5.7 1698 28000,MYSQL教程MySql Error 1698(28000)问题的解决方法

    搜索热词 <MysqL教程MysqL Error 1698(28000)问题的解决方法>要点: 本文介绍了MysqL教程MysqL Error 1698(28000)问题的解决方法,希望对 ...

  5. mysql 1698_MySql Error 1698(28000)问题的解决方法

    一,问题描述: MysqlERROR1698(28000)解决,新装了mysql-server-5.7,登录为这一问题,普通用户不能进mysql,只有root用户才能进,并且不需要任何密码. ~$ m ...

  6. mysql5.7 1698 28000_MySqlError1698(28000)问题的解决方法

    一,问题描述: MysqlERROR1698(28000)解决,新装了mysql-server-5.7,登录为这一问题,普通用户不能进mysql,只有root用户才能进,并且不需要任何密码. ~$ m ...

  7. Oracle 报错 28000原因和解决方法

    Oracle 报错 28000原因和解决方法 使用PLSQL登录Oracle数据库时提示"ORA-28000:这个帐号被锁定". 出现这个问题的原因是:在Oracle databa ...

  8. mysql error1045 yes_MySQLERROR1045(28000)错误的解决办法_MySQL

    错误现象: ERROR 1045 (28000): Access denied for user'ODBC'@'localhost'(using password: NO) ERROR 1045 (2 ...

  9. 关于mysql ERROR 1045 (28000)错误的解决办法

    错误情景: 使用Navicat打开mysql的时候弹出错误框 错误代码: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' ( ...

最新文章

  1. 寒武纪宣布完成B轮融资 整体估值达25亿美元
  2. 新冠肺炎疫情预测与防控策略评价
  3. 2020新年发红包Java实现
  4. 【数字信号处理】基于DFT的滤波系列3之插值滤波(含MATLAB代码)
  5. vbs 连oracle 负载均衡,(原)QTP中用VBS调用PLSQL并执行相关语句
  6. git报错:fatal: remote origin already exists
  7. 时间函数java_Java时间函数整理
  8. LeetCode(1002)——查找常用字符(JavaScript)
  9. window启动过程讲解--PPT截图[张银奎]
  10. 图片以base64格式显示出来
  11. 为什么外链建设要灵活多变呢?
  12. Boss直聘招聘数据分析-202104月版
  13. 怎么设置台式计算机密码忘了,台式电脑忘记开机密码怎么办
  14. Motorola ME525 刷机教程
  15. 鼠标修复DoubleClickFix
  16. 使用MySQL的聊天室_聊天室phpmysql(一)
  17. 浅析多元回归中的“三差”:离差(Deviation)、残差(Residual)与误差(Error)
  18. C++ Problems
  19. 云深处科技推出国内首款IP66工业级防水机器狗“绝影X20”
  20. oracle 查询 ppt,oracle子查询.ppt

热门文章

  1. Red Team之Empire渗透工具介绍和使用
  2. 基于android手机实时监控ipcam视频之二:mediastream2
  3. no moudle named sklearn-impute
  4. Spring Boot 实现微信点餐系统
  5. 7 展讯Sprd设置-电池-关联自启动-跟踪代码
  6. 使用Stream流时报java.lang.IllegalStateException: stream has already been operated upon or closed错误
  7. 电脑上怎么调出输入法
  8. 2018 SUCTF招新赛
  9. 复习SSM day01 SSM Maven工程的搭建及配置文件
  10. 两手空空也创业 没钱照样做老板