1.空密码重置
2.创建用户
1.create database ruozedb;
2.grant all privileges on ruozedb.* to ruoze@’%’ identified by ‘123456’;(%表示ruoze这个用户的密码是任意的,可以改为其他的数字)
3.flush privileges;
%就是192.168.0.190
3.删除空用户空密码
mysql> use mysql
Database changed
mysql> select user,password,host from user;(语法)
设置密码
mysql> update user set password=password(‘123456’) where user=‘root’;
mysql> select user,password,host from user;
mysql> delete from user where user=’ ’ ;(删除用户,空密码)
mysql> select user,password,host from user;
mysql> flush privileges;(刷新权限)
Ctrl+z退出mysql或者exit
4.删除用户的数据库
drop user ruoze@’%’