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