报错信息:

mysql> mysqladmin -uroot -p123456 password 654321;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin -uroot -p123456 password 654321' at line 1

mysql> set password for root@localhost = password('654321');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'password('654321')' at line 1

报错原因:

新版本MySQL(8.0以上)不支持使用mysqladmin -uroot -p123456 password 654321;“set password for root@localhost = password('654321');”来修改密码。

解决方法:

  • alter user'root'@'localhost' identified by '新密码';
  • alter user'root'@'localhost' identified with mysql_native_password by '新密码';

最新文章

  1. mysql 常用自定义函数解析
  2. 【java】:通用接口
  3. Android显示等宽图片的问题
  4. python 中颜色的表示
  5. (转)使用pth文件,让python方便的import自己写的模块
  6. jwt (JSON Web Token)官方说明
  7. Kmeans聚类算法
  8. Yii2设计模式——简单工厂模式
  9. VMware虚拟机共享宿主机硬盘步骤
  10. ELK+Filebeat+Kafka+ZooKeeper 构建海量日志分析平台(elk5.2+filebeat2.11)
  11. 快速掌握JavaScript面试基础知识(二)
  12. vue自定义一个v-model
  13. 用反向代理nginx proxy_pass配置解决ie8 ajax请求被拦截问题 ie8用nginx代理实现跨域请求访问 nginx405正向代理request_uri
  14. python爬虫——对爬到的数据进行清洗的一些姿势(5)
  15. 日期条控件 DateFieldControl
  16. [LISP] LISP Collections
  17. docker——三剑客之Docker swarm
  18. BZOJ2208:[JSOI2010]连通数——题解
  19. LUOGU 1440
  20. GNU Readline 库及编程简介【转】

热门文章

  1. 整理汇总系统中空值的使用方法,后台+jsp
  2. TreeMap简介
  3. PLC常见四大故障及其处理方法
  4. 吴裕雄--天生自然 python开发学习笔记:一劳永逸解决绘图出现中文乱码问题方法
  5. Python---8函数(函数的参数&递归函数)
  6. Java发送Post请求,参数JSON,接收JSON
  7. Caused by: com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0, fastjson-version 1.2
  8. OCR:慧眼读世界
  9. 有用户及目录判断的删除文件内容的Shell脚本
  10. c#数据库解析