查询mysql具体版本

SELECT @@VERSION

问题分析:mysql版本8.0.13,在给新用户授权时,发生了变化:

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 'identified by  'password' with grant option' at line 5, Time: 0.000000s

出错的语句:

grant all privileges on *.* to 'root'@'1ocalhost' identified by  'password' with grant option

修正后的语句:分开三次执行

#创建账户
create user 'root'@'1ocalhost' identified by  'password'#赋予权限,with grant option这个选项表示该用户可以将自己拥有的权限授权给别人
grant all privileges on *.* to 'root'@'1ocalhost' with grant option#改密码&授权超用户,flush privileges 命令本质上的作用是将当前user和privilige表中的用户信息/权限设置从mysql库(MySQL数据库的内置库)中提取到内存里
flush privileges;

原因分析 :此版的的mysql版本把将创建账户和赋予权限分开了。

创建账户::create user ‘用户名’@‘访问主机’ identified by ‘密码’;
赋予权限:grant 权限列表 on 数据库 to ‘用户名’@‘访问主机’ ;
with grant option这个选项表示该用户可以将自己拥有的权限授权给别人

mysql版本:‘for the right syntax to use near ‘identified by ‘password‘ with grant option‘相关推荐

  1. mysql版本:'for the right syntax to use near 'identified by 'password' with grant option'

    查询mysql具体版本 SELECT @@VERSION 问题分析:mysql版本8.0.13,在给新用户授权时,发生了变化: 1064 - You have an error in your SQL ...

  2. MySQL 版本:'for the right syntax to use near 'identified by 'password' with grant option'

    MySQL 5.7 版本授权语句: GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD ON *.* TO 'exporter'@'%' ...

  3. MySQL赋权报错:’the right syntax to use near ‘identified by ‘password‘ with grant option‘

    MySQL版本8.0.21,在给新用户授权时,执行如下语句: grant all privileges on *.* to 'root'@'%' identified by '123456' with ...

  4. syntax to use near ‘identified by “password“‘ at line 1

    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your ...

  5. mysql远程连接权限grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant option语句报错

    mysql远程连接权限grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option语句报错 记录 ...

  6. 解决mysql的赋权操作之GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION问题

    一种情况 mysql的赋权操作:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION: ...

  7. mysql 8.0.21 对用户授权报错 near ‘IDENTIFIED BY ‘123456‘ with grant option‘ at line 1

    mysql 8.0.21 对用户授权报错 near 'IDENTIFIED BY '123456' with grant option' at line 1 问题描述 mysql在创建用户,对用户授权 ...

  8. mysql GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; ERROR 1819

    mysql> GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; ERROR 1819 ...

  9. mysql8设置用户权限报错You have an error in your SQL syntax;right syntax to use near ‘IDENTIFIED BY

    mysql 8 设置用户权限命令和之前不一样 之前: grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' wi ...

最新文章

  1. Django Bakend--后台管理插件开发-01
  2. sqlservice对于时间的操作
  3. 噩耗...............
  4. 【项目管理】PMO内容整理
  5. matlab melbankm,Matlab v_melbankm函数参数详解(英文附例)
  6. 10年 | 写了10年的代码,我最怕写Mybatis这些配置,现在有详解了
  7. gevent的碎碎念(一)——协程
  8. linux内核之进程调度
  9. 辞职日记----记录31岁的程序员跳槽心态
  10. Cortex-M0学习
  11. 云服务器安全配置开放哪些端口
  12. empty是什么意思 php,empty是什么意思中文翻译
  13. LIBSVM的FQA
  14. macbook pro黑屏没反应无法开机的解决方法
  15. java interop,服务器程序的Xamarin-Java.Interop体验(一)
  16. ASP.NET MVC5 实现基于Quartz.NET任务调度
  17. [转]微信终端跨平台组件 mars 系列(二) - 信令传输超时设计
  18. 《LaneAF:Robust Multi-Lane Detection with Affinity Fields》论文笔记
  19. 子网怎么算?IP地址(A,B,C,D,E类地址),子网,子网掩码,容纳主机20台,网络号,主机号
  20. 【MES系统】这个表格让您秒懂MES制造执行系统与ERP企业管理系统的区别及联系

热门文章

  1. 『ssh』使用shell远程执行命令
  2. java——异常——自定义异常类
  3. java计算机毕业设计夕阳红养老院系统源码+系统+数据库+lw文档+mybatis+运行部署
  4. lua学习第一课:下载安装(适合windows)、简单程序编译和学习网站推荐
  5. 让你的 Webstorm 永久激活
  6. 函数习题(6):判断一个数是否是回文数
  7. 解决SVN冲突的方法
  8. 崔庆才老师爬虫原理讲解笔记
  9. 打开csdn,ie报R6025错误
  10. VB实现向窗口发送按键消息