# 登录 mysql -u root -p # 创建数据库 create database dev # 查看 show databases # 创建用户/schema insert into mysql.user(Host,User,Password) values("localhost","dev",password("dev")); # 刷新 flush privileges; # 数据库给用户复权 grant all privileges on dev.* to dev@localhost identified by "dev"; # 刷新 flush privileges; 完成