mysql 床架新数据库并分配用户权限
1.登录数据库
mysql -u root -p
2.创建数据库
CREATE DATABASE test;
3.添加用户
create user 'test'@'localhost' identified by '1234';
4.刷新权限,并给用户分配数据库权限
use mysql; flush privileges; grant all privileges on test.* to test@'%' identified by '123456';