mysql 5.5.xx的一个bug

在安装mysql5.5xx后,新建库和用户,并且给用户授权,语句如下:

CREATE DATABASE test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE test;
drop user test;
create user test identified by 'test@123';
grant all on *.* to test@'%' IDENTIFIED BY 'test@123';
update mysql.user set Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y',Create_priv='Y',Drop_priv='Y',Reload_priv='Y',Index_priv='Y',Alter_priv='Y',Show_db_priv='Y',Super_priv='Y',Create_tmp_table_priv='Y',Lock_tables_priv='Y',Execute_priv='Y',Repl_slave_priv='Y',Repl_client_priv='Y',Create_view_priv='Y',Show_view_priv='Y',Create_routine_priv='Y',Alter_routine_priv='Y',Create_user_priv='Y' where User='test';

FLUSH PRIVILEGES;


运行后发现test用户的密码依旧为空,哪怕用test登录后,修改自己的密码后,再登录也还是空,再多台机器尝试过,包括SUSE和windows系统都试过,都存在这个问题,后来无意中删除了匿名用户,就好了,语句如下:
use mysql;
delete from user where user='';


你可能感兴趣的:(windows,mysql,SuSE)