解决mysql的赋权操作之GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION问题
一种情况
mysql的赋权操作:GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFI编程客栈ED BY ‘123456‘ WITH GRANT OPTION;
mysql赋android权操作:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
flush privileges;
GRANT:赋权命令ALL PRIVILEGES:当前用户的所有权限ON:介词*.*:当前用户对所有数据库和表的相应操作权限TO:介词‘root’@’%’:权限赋给roo开发者_数据库t用户,所有ip都能连接IDENTIFIED BY ‘123456’:连接时输入密码,密码为123456WITH GRANT OPTION:允许级联赋权20200901:
将GRANT语句通过代码块包起来二种情况
mysql中远程连接权限语句grant all privileges on *.VawFYbXAcO* to ‘root‘@‘%‘ identified by ‘123456‘ with grant optio报错
grant all privileges on *.* tojavascript ‘root‘@‘%‘ identified by ‘123456‘ with grant optio
原因: mysql的版本问题,这条语句适用于MySQL8.0之前
解决: mysql8.0及以上版本需要使用以下语句:
create user root@'%' identified by '123456'; grant all privileges on *.* to root@'%' 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;内容请搜索我们以前的文章或继续浏览下javascript面的相关文章希望大家以后多多支持我们!
精彩评论