grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘连接口令’;
控制到库级的命令示范:
grant all privileges on shangcheng.* to shangcheng@localhost identified by '123456';
用户名为:shangcheng
库名:shangcheng
密码:123456
SET PASSWORD FOR 'kuangqu'@ 'localhost' = PASSWORD( '********' )
更改mysql密码命令