无论设置什么密码,都不起作用。登录时输入任何密码都可以进去。
在mysql内查看显示如下:
MariaDB [mysql]> select authentication_string from user; |
---|
authentication_string |
1 row in set (0.00 sec)
MariaDB [mysql]> select user from user; |
---|
user |
root |
1 row in set (0.00 sec)
MariaDB [mysql]> select host from user; |
---|
host |
localhost |
1 row in set (0.00 sec)
解决了,是mysql密码验证方式有问题。
select Host,User,plugin from mysql.user where User='root';
这个时候会发现plugin(加密方式)是unix_socket,
然后就可以正常使用