当前位置: 首页 > news >正文

MySQL 8 修改root密码ERROR 1064 (42000): You have an error in your SQL syntax;

  1. root先利用原密码登陆

mysql -u root -p
Enter password: *******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.26 MySQL Community Server - GPLCopyright (c) 2000, 2021, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

2.原修改方式syntx error

mysql> set password for root@localhost = password('xxxxx');
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('xxxxxx')' at line 1

3.MySQL 8对应修改方式,修改的是当前登陆用户的password

mysql> set password = 'yyyyyy';
Query OK, 0 rows affected (0.07 sec)mysql>
http://www.lryc.cn/news/94780.html

相关文章:

  • SpringCloud——分布式请求链路跟踪Sleuth
  • 【2 beego学习 - 项目导入与项目知识点】
  • Langchain-ChatGLM配置文件参数测试
  • 测试QT读写锁(QReadWriteLock )和互斥锁(QReadWriteLock )的执行效率
  • 如何在 Windows 中免费合并 PDF 文件 [在线和离线]
  • 【LLM】金融大模型场景和大模型Lora微调实战
  • 途乐证券股市资讯-英伟达,又创历史新高!美股全线上涨
  • MySQL表聚合函数
  • JavaWeb 速通XML
  • redis浅析
  • 四种缓存的避坑总结
  • flutter开发实战-flutter二维码条形码扫一扫功能实现
  • 一篇文章了解Redis分布式锁
  • 记录第一次组装电脑遇到的坑
  • 右键pdf文件没有打印
  • 什么是CDN?CDN的原理和作用是什么?
  • 链路传播(Propagate)机制及使用场景
  • pytorch技巧总结1:学习率调整方法
  • 谈谈VPN是什么、类型、使用场景、工作原理
  • windows 下载安装Redis,并配置开机自启动
  • 2. CSS3的新特性
  • 从零开始训练神经网络
  • 连接区块链节点的 JavaScript 库 web3.js
  • js:scroll平滑滚动页面或元素到顶部或底部的方案汇总
  • 【Docker】Docker的部署含服务和应用、多租环境、Linux内核的详细介绍
  • C国演义 [第五章]
  • Proxy-Reflect使用详解
  • 【Linux后端服务器开发】Shell外壳——命令行解释器
  • 【无公网IP】在外Windows远程连接MongoDB数据库
  • mac python3 安装virtualenv