I'm trying to setup ejabberd under FreeBSD 8.2 to use MySQL db.
I installed erlang-lite from ports with ODBC support, enabled ODBC support in ejabberd itself (both with make config and in Makefile itself). erlang-mysql and libiodbc are in place as well.
Config is the following:
{auth_method, odbc}.
{odbc_server, {mysql, "localhost", "ejabberd", "ejabberd", "password"}}.
MySQL is also installed and runs perfectly, proper database structure is created, user ejabberd is allowed to access MySQL and the database.
However whenever I launch it I have the folowing errors:
=ERROR REPORT==== 2012-03-04 21:34:51 ===
Error in process <0.369.0> on node 'ejabberd@localhost' with exit value: {{badmatch,<<0 bytes>>},[{mysql_conn,greeting,2},{mysql_conn,mysql_init,5},{mysql_conn,init,7}]}
Followed by a bunch of warnings:
=INFO REPORT==== 2012-03-04 21:34:56 ===
I(<0.367.0>:ejabberd_odbc:216) : mysql connection failed:
** Reason: "timed out"
** Retry after: 30 seconds
I tried to change the default timeout in mysql_conn, but that didn't help.
ЫъГЬ wrote: erlang-mysql and
erlang-mysql and libiodbc are in place as well.
THere are several libraries written in Erlang to connect to MySQL. ejabberd uses the mysql library included in ejabberd-modules SVN. Maybe the library you installed is another one.
Hmm, indeed, erlang-mysql is
Hmm, indeed, erlang-mysql is not listed as a dependance for erlang-lite port. I tried uninstalling erlang-mysql and then reinstalling erlang and ejabberd (to make them pull whatever library they want), but it won't start because there are no mysql libs at all:
ejabberd is configured to use 'mysql', but the following Erlang modules are not installed: '[mysql,
mysql_auth,
mysql_conn,
mysql_recv]'
erlang-mysql provides those files, so why can't I use it?
After that I tried to use library from svn, but nothing changed, it still gives the same errors.