Mysql:sql create user,grant,flush,drop user(增删用户)

来源:互联网 发布:html2pdf python 编辑:程序博客网 时间:2024/06/15 20:28
#创建用户,此时只有链接数据库的权限,需后续授权create user 'scott@:localhost' identified by 'Scott';#添加用户对sina数据库的所有权限grant all privileges on sina.* to scott@localhost identified by 'Scott';#上面这条grant语句在新版mysql将被弃用#刷新系统权限表flush privileges;#显示用户权限show grants for scott@localhost;#删除用户drop user scott@localhost;
原创粉丝点击