mysql创建用户

来源:互联网 发布:屏幕录像软件 绿色 编辑:程序博客网 时间:2024/06/06 06:51

使用root帐户登陆mysql

mysql -uroot -p

创建用户

创建一个只能在本机登陆的用户

create user '用户名'@'localhost' identified by '用户的密码';

创建一个只能由特定远程主机使用的帐户

create user '用户名'@'远程IP地址' identified by '用户的密码';

创建一个本机和远程主机都能使用的账户

create user 'unlimituser'@'%' identified by '用户的密码';
0 0