1. 用户相关
创建一个本地用户,密码为 pwd
CREATE USER username@localhost IDENTIFIED BY ‘pwd';
给用户是授权, 可以授权具体的操作、或者所有权限,以及对应的密码
GRANT SELECT,INSERT,UPDATE,DELETE ON .to user@”%” IDENTIFIED BY “pwd”;
GRANT ALL PRIVILEGES ON u_database.* TO user@localhost;
删除一个用户
DELTE FROM user WHERE user=’username’ AND host=’localhost';
2. 表相关
增加列
ALTER