OperationalError: (2003, "Can't connect to MySQL server on '192.168.240.242' (111)")
1、编辑my.cnf,默认为/etc/mydql/my.cnf,注释掉bind-address = 127.0.0.1或者修改为0.0.0.0;
# Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. # bind-address = 127.0.0.1
2、重启mysql:
sudo /etc/init.d/mysql restart
二、
OperationalError: (1045, "Access denied for user 'nova'@'192.168.240.242' (using password: YES)")
mysql数据库权限的原因
单节点的时候mysql用户设置成了localhost 权限
所以用ip地址是访问不到的。