问题一:
使用mysql --verbose --help | grep my.cnf 命令常看my.cnf文件位置
vim 修改my.cnf
[mysqld]
Only allow connections from localhost
bind-address = 127.0.0.1
发现确实只绑定了127.0.0.1将bind-address修改为0.0.0.0 使其允许任意ip连接
问题二:
MySQL said: Authentication plugin ‘caching_sha2_password‘ cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found
执行:
mysql -u root -p
注意密码复杂度,大小写特殊符号数字,八位以上
# ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘App@123456‘;