记录一下mysql-5.1创建普通用户无法登陆的问题,之前一直没有遇到过,无论使用flush privileges刷新还是重新授权都不行。
//创建用户:
grant all on hive.* to hive@'%' identified by "hive";
//刷新权限:
flush privileges;
//查看创建的用户:
select user,host from mysql.user;
mysql -uhive -h 10.1.1.1 -phive
登陆失败,最后重新删除用户,另外把那些空用户也删除,然后再创建用户登陆成功。
drop user ''@localhost;
drop user ''@127.0.0.1;