1.//版本更新后改变了插入用户表的语句, 应该用这个createuser'qilinlin'@'%' identified by '123'; //用户名为qilinlin ,'%'表示所有ip都可访问,'123'为密码
2.再赋予权限
grant all privileges on *.* to 'qilinlin'@'%' with grant option;//像root一样权限 *.* 所有表
grant select,insert,update,delete,create,drop on *.* to 'qilinlin'@'%' with grant option; //给了zc账号 所有数据库中所有表的增删查改和建表删表的权限
flush privileges; //释放
3.删除用户
drop user qilinlin@‘%’ ;
flush privileges;
4.在MySQL 5.7 password字段已从mysql.user表中删除,新的字段名是“authenticalion_string”.
选择数据库:use mysql;
更新root的密码:update user set authentication_string=password('新密码') where user='root' and Host='localhost';//刷新权限:flush privileges;
mysql -用户增删改查–1.//版本更新后改变了插入用户表的语句, 应该用这个create user 'qilinlin'@'%' identified by '123'; //用户名为qilinlin ,'%'表示所有ip都可访问,'123'为密码2.再赋予权限grant all privileges on *.* to 'qilinlin'@'%' with grant option;//像root一样权限 *.* 所有表grant select,insert,update,dele