我正在尝试使用erlang-mysql-driver连接到我的MySQL数据库但是没有运气。
我使用以下Erlang代码连接
mysql:start_link(p1,"localhost","myname","mypass","stocks").
我得到的错误信息是:
mysql_recv:108: mysql_recv: Failed connecting to "localhost":3306 : {error,
econnrefused}
mysql_conn:361: failed connecting to "localhost":3306 : {error,
"connect failed : {error,econnrefused}"}
mysql:511: failed starting first MySQL connection handler, exiting
** exception exit: {badfun,undefined}
in function mysql:start_reconnect/2
in call from mysql:init/1
in call from gen_server:init_it/6
in call from proc_lib:init_p_do_apply/3
有什么想法吗?