mysql 创建user
作者:
风亡小窝 | 来源:发表于
2016-09-27 15:10 被阅读13次
创建
基本语法
create user 'username'@'host' identified by 'pwd'
创建可从任意主机登录的用户
create user 'username'@'%' identified by 'pwd'
授权
基本语法
grant all privileges on dbname.tablename to 'username'@'host' identified by 'pwd'
将某个数据库的所有表的权限授予用户
grant all privileges on dbname.* to 'username'@'host' identified by 'pwd'
将所有数据库的所有表的权限授予用户
grant all privileges on *.* to 'username'@'host' identified by 'pwd'
本文标题:mysql 创建user
本文链接:https://www.haomeiwen.com/subject/uwwcyttx.html
网友评论