Home  >  Article  >  Database  >  设置的mysql密码无效的问题_MySQL

设置的mysql密码无效的问题_MySQL

WBOY
WBOYOriginal
2016-06-01 13:36:421303browse

bitsCN.com


设置的mysql密码无效的问题

 

给用户设置密码后,无密码时可以登录,使用密码则不能登录。

试着删除空用户,然后刷新权限表就可以了。

 

mysql>delete from mysql.user where user='';

 

mysql>flush privileges;

 

所以从安全角度考虑,在Mysql安装好、启动后第一件事情就要设置密码,
和删除空账户(切记):    

 

mysql>update mysql.user set password=password('yourpassword') where user='root';

mysql>delete from mysql.user where user='';

mysql>flush privileges;

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn