我想从clojure连接到mysql数据库。我使用取自示例代码: http://corfield.org/blog/post.cfm/connecting-clojure-and-mysql但我得到这个错误:从clojure连接到mysql服务器
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
MySQL服务器被绑定到127.0.0.1:3306。将localhost更改为127.0.0.1 in:subname不起作用。我已经设置了mysql服务器来记录所有的调试信息,甚至没有看到连接。我在这里做错了什么?
你确定你的MySQL服务器配置为接受网络连接吗? IIRC某些服务器配置只允许使用unix文件套接字而不是网络连接。您可以通过运行mysqlclient -h $ yourhostname ....来测试它。 –