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

这篇具有很好参考价值的文章主要介绍了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 - GPL

Copyright (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>

文章来源地址https://www.toymoban.com/news/detail-570155.html

到了这里,关于MySQL 8 修改root密码ERROR 1064 (42000): You have an error in your SQL syntax;的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • ERROR 1064 - You have an error in your SQL syntax;

    ERROR 1064 - 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 \\\'(\\\'/\\\', 少个逗号吧,以前开始写SQL,特别是修改SQL的时候容易出现这样错误。 而且自己也知道在附近,就是有时候头脑不知道咋滴,就没看出来了。 在我的印象中,

    2024年02月14日
    浏览(35)
  • pycharm中的python与mysql(1064):“You have an error in your SQL syntax; check the manual that corresponds

    1064, “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 \\\'‘director’,‘star’,‘score’) values (‘奥利 维埃·纳卡什’,‘弗朗索瓦·克é’ at line 1” 这个错误原因是在pycharm里敲代码时,将python语法与mysql语法混淆了。 mysql语法

    2024年02月16日
    浏览(29)
  • 错误代码: 1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL ser

             翻译一下就是: SQL语法有错误;查看与您的MySQL服务器版本相对应的手册,了解“……”附近要使用的正确语法。         会出现这种问题,大部分都是因为自己的粗心大意啦~ 第一步:         先检查一下自己写的SQL语句中的符号是否有中文的,有的话改

    2024年02月12日
    浏览(53)
  • pymysql.err.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that co

    pymysql.err.ProgrammingError: (1064, \\\"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 \\\'CREATE TABLE `sinatop20` ( `snid` int(11) NOT NULL AUTO_INCREMENT, `id` varchar(\\\' at line 1\\\") 对于报错解析:很明显这是语法错误,我上看下看,左看右看,都没有看

    2024年02月17日
    浏览(44)
  • MySQL 8的MGR集群中设置autocommit=0引起ERROR 1064 (42000)错误

    在一套MySQL MGR集群测试环境中,同事测试时,在my.cnf参数文件中修改了autocommit参数(修改为autocommit=0),结果上周五,由于系统管理员要升级RHEL 8.8的系统补丁,所以将这这三台MySQL的数据库服务关闭了,升级完RHEL 8.8的系统补丁后,启动MySQL的集群时遇到了“ERROR 1192 (HY000)

    2024年02月09日
    浏览(38)
  • MySQL java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax 关键字异常处理

    使用mybatis插入数据时出现java.sql.SQLSyntaxErrorException异常 收到错误“由:java.sql.SQLSyntaxErrorException:您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,了解在第14行的“”附近使用的正确语法。 liquibase回答: You have an error in your SQL syntax; check the manual that corresponds to

    2024年02月15日
    浏览(37)
  • You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    最近做项目又给报错了,找了一会感觉错误非常巴卡,还是记录一下比较好 乍一看没有毛病,但是一运行访问接口,就报错了 为什么呢,因为user引号用错了 1.我开始是单引号、反单引号分不清 java中键值用(‘)单引号,列名(`)反单引号。就是上面一排数字键最左边~符号

    2024年01月21日
    浏览(46)
  • 如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?

    目录 ​​​​​​​ 📢CHECK约束 📢那么会遇到什么问题呢? 📢那么关于如何使用CHECK约束进行检查,以下是一个简单的演示:          ✨ CHECK约束用于在插入或更新数据时对列值进行条件检查。它允许你定义一个条件,确保将要插入或更新的数据满足特定的要求。如

    2024年01月23日
    浏览(49)
  • 全网多种方法解决You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

    今天在调试低代码的接口,突然报出如下的错误: 即 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 \\\'desc,name,is_deleted ) VALUES(\\\'测试哈\\\',\\\'测试哈\\\',\\\'测试项目\\\',1 )\\\' at line 11 。 于是,查看控制台报出的详细错误信息,如下图所示

    2024年02月15日
    浏览(39)
  • 【解决问题】Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your S

    在更新数据时候遇到如下报错信息: Error updating database. Cause: java.sql.SQLSyntaxErrorException: 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 ‘order’’ at line 4 1、先检查自己的字段是否正确匹配,可能是字符出现了错误 2、还有

    2024年02月11日
    浏览(54)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包