eclipse配置连接mysql出现ping failed

eclipse配置连接mysql出现ping failed,第1张

可能是以下的其中一种情况: 一:连接URL格式出现了问题(Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/XX","root","XXXX")二:驱动字符串出错(com.mysql.jdbc.Driver) 三:Classpath中没有加入合适的mysql_jdbc驱动(驱动要和你的数据库版本一致)四:驱动jar包放的位置不对

误1、[MgmtSrvr] WARNING -- 1011 Unable to connect with connect string: nodeid=0,localhost:1186

处理:一般这个情况是系统ping 127.0.0.1不通,可能是网卡问题,但是ping在eth0和eth1上配置的IP地址却通,所以处理方法是在/etc/hosts文件中添加:

192.168.1.5 localhost

即可。192.168.1.5根据自己配置的IP地址进行修改。

错误2、在修改了数据节点目录后,数据节点遇到如下错误:[ndbd] ERROR-- Couldn't start as daemon, error: 'Failed to lock pidfile '/opt/mysql_cluster/ndb_data/ndb_11.pid', errno: 37'

处理:由于数据节点的目录是挂载在nas存储上面,由于防火墙问题导致nas挂载异常,以致出现以上错误,关闭防火墙,重新挂载nas存储即可。

错误3、在修改了数据节点目录后,mysql节点遇到如下警告:[Warning] NDB : Tables not available after 15 seconds. Consider increasing --ndb-wait-setup value,导致管理节点识别不到mysql节点

处理:经检查,是配置文件my.cnf里ndb-connectstring参数的配置有误,改成正确的管理节点IP地址即可。

Warning: World-writable config file '/etc/my.cnf' is ignored

Unable to connect with connect string: nodeid=0,localhost:1186

Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.

2011-06-08 23:31:35 [ndbd] ERROR-- Could not connect to management server, error: ''

解决办法 chmod 644 /etc/my.cnf


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/8350871.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存