mysql>create user 'myroot'@'localhost' identified by 'myroot'; mysql>grant all privileges on *.* to 'myroot'@'localhost'; mysql>flush priviledges; ok,能夠拿myroot在本地登陸管理,可是要在遠程管理還不行。接下來解決在遠程登陸管理的問題。 mysql>create user 'myroot'@'%' identified by 'myroot'; mysql>grant all privileges on *.* to 'myroot'@'%'; mysql>flush priviledges;
還有,mysql.user密碼加密的方式是使用PASSWORD進行的。
刪除用戶 mysql>revoke all on *.* from sss@localhost ; msyql>Delete from user where user = "user_name" and host = "host_name" ; mysql>flush privileges ;