GRANTALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITHGRANT OPTION;
FLUSH PRIVILEGES;
3.删除用户
@>mysql -u root -p @>密码 mysql>DELETE FROM user WHERE User="phplamp" and Host="localhost"; mysql>flush privileges; //删除用户的数据库 mysql>drop database phplampDB;
4.修改指定用户密码
@>mysql -u root -p @>密码 mysql>update mysql.user set password=password('新密码') where User="phplamp" and Host="localhost"; mysql>flush privileges;