1、使用root账号登入mysql
2、创建数据库
create database test;
3、创建用户
create user 'test'@'%' identified by 'password';
4、用户授权
grant all privileges on test.* to 'test'@'%';
5、刷新权限
flush privileges;
create database test;
create user 'test'@'%' identified by 'password';
grant all privileges on test.* to 'test'@'%';
flush privileges;
本文标题:MySQL创建数据库和对应的用户
本文链接:https://www.haomeiwen.com/subject/aeayactx.html
网友评论