sqlyog在连接linux中的mycat时,关闭防火墙的前提下怎么都连不上,使用 ./mycat console 命令,打印如下错误:
jvm 1 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: itcast01: itcast01: Temporary failure in name resolution
wrapper | JVM exited while loading the application.
wrapper | Launching a JVM…
wrapper | JVM exited while loading the application.
jvm 2 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: itcast01: itcast01: Temporary failure in name resolution
wrapper | Launching a JVM…
wrapper | JVM exited while loading the application.
jvm 3 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: itcast01: itcast01: Temporary failure in name resolution
最终解决:
根目录下etc/sysconfig 文件夹中的network文件中HOSTNAME=域名, 将域名复制到etc下的hosts文件中127.0.0.1 的末尾。重启mycat,在用sqlyog连接,最终搞定!