#连接mysql
mysql -u root -p
#创建用户
create USER "adam"@"localhost" identified by '你的密码';
#查看用户列表
select CONCAT('User:',user,'@',host) from mysql.user;
输出
+-------------------------------+
| CONCAT('User:',user,'@',host) |
+-------------------------------+
| User:adam@localhost |
| User:mysql.session@localhost |
| User:mysql.sys@localhost |
| User:root@localhost |
+-------------------------------+
4 rows in set (0.00 sec)
#分配权限
grant all privileges on wohuanicai.* to 'adam'@'localhost' identified by '你的密码';
#Over本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top
