Centos7 配置Mariadb(mysql)時,客戶端登陸html
1045 access denied for user 'root'@'localhost' using password yes mysql
MariaDB [mysql]> select host,user,password from user; +-----------+------+-------------------------------------------+ | host | user | password | +-----------+------+-------------------------------------------+ | localhost | root | *27732D6FB9C956E7D13CE8A983210AA5B1FF6C3C | | 127.0.0.1 | root | *27732D6FB9C956E7D13CE8A983210AA5B1FF6C3C | | ::1 | root | *27732D6FB9C956E7D13CE8A983210AA5B1FF6C3C | | % | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | +-----------+------+-------------------------------------------+ 4 rows in set (0.00 sec)
密碼從新設置sql
% | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B
SET PASSWORD FOR 'root'@'%' = PASSWORD('xxxxx');shell
OK。。。centos
Can't connect to MySQL server on '192.168.1.101' (61)centos7
鏈接mysql 時出現(61)錯誤 ,官方解釋是:spa
OS error code 61: No data available
經排插以爲多是防火牆的問題,因centos7 防火牆默認是 firewall 不是iptables,調了很久開啓3306端口的受權未果。最終一怒之下關掉了防火牆,此問題也得已解決。code