mysql的赋权操作:GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;

  • Post author:
  • Post category:mysql


mysql赋权操作:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

flush privileges;

GRANT:赋权命令

ALL PRIVILEGES:当前用户的所有权限

ON:介词

*.*:当前用户对所有数据库和表的相应操作权限

TO:介词

‘root’@’%’:权限赋给root用户,所有ip都能连接

IDENTIFIED BY ‘123456’:连接时输入密码,密码为123456

WITH GRANT OPTION:允许级联赋权

20200901:

将GRANT语句通过代码块包起来



版权声明:本文为u010953706原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。