Error
I want to use MySQL to store some tables of ejabberd, so I installed the Erlang library to handle MySQL, configured ejabberd and created the tables. However, I still get this error message:
=ERROR REPORT==== 11-Oct-2006::20:56:52 === E(<0.220.0>:ejabberd_odbc:277): MySQL connection failed: timeoutAnd some more similar error messages.
Explanation
It seems ejabberd can connect to the MySQL database, but the communication is not as fast as required. The Erlang-MySQL library defines a timeout of 5 seconds. Maybe this value is to small in your case.
Solution
To increase the timeout, edit the file mysql_conn.erl, change this value, compile the library, install it and restart ejabberd:
-define(DEFAULT_STANDALONE_TIMEOUT, 5000).