mysql常用操作命令
创建用户
create user 'laohai_subaccount'@'%' identified by 'laohai@2018';
create user 'laohai_subaccount'@'localhost' identified by 'laohai@2018';
增加所有权限至新用户
grant all privileges on *.* to 'laohai_subaccount'@'%'identified by 'laohai@2018' with grant option;
create user 'laohai_subaccount'@'your ip' identified by 'laohai@2019!.';
grant all privileges on *.* to 'laohai_subaccount'@'your ip'identified by 'laohai@2019!.' with grant option;
收取所有权限至新用户
revoke all privileges on *.* from 'laohai_subaccount'@'%' ;