ejabberd配置mysql

一.安装mysql

二.创建数据库,导入ejabberd.sql

mysql -u root -p

CREATE DATABASE ejabberd;
exit

mysql -u root -p ejabberd < mysql.sql
#https://github.com/processone/ejabberd/blob/master/sql/mysql.sql

 

三.配置mysql

%%{auth_method, internal}.

{auth_method, odbc}.

%%  
%% MySQL server:  
%%  
{odbc_server, {mysql, "localhost", "ejabberd", "root", "MySqlPassword"}}.

{mod_last_odbc,     []},
{mod_offline_odbc,  []},
{mod_privacy_odbc,  []},
{mod_private_odbc,  []},
{mod_pubsub_odbc,   [ % requires mod_caps ...
{mod_roster_odbc,   []},
{mod_vcard_odbc,    []},

 

http://iohq.net/index.php?title=Building_an_Ejabberd_Server_with_MySql

 

http://srijan.me/ejabberd-storing-data-in-mysql/

 

无法正常启动,查看/var/log/ejabberd/ejabberd.log

 ejabberd is configured to use 'mysql', but the following Erlang modules are not installed: 
'[mysql, mysql_auth, mysql_conn, mysql_recv]'

 

http://www.kissthink.com/archive/8293.html

 

ejabberd msyql driver(自己编译或者直接下载编译好的)

http://stefan-strigler.de/2009/01/14/ejabberd-mysql-drivers-for-debian-and-ubuntu/

编译安装步骤https://www.ejabberd.im/ejabberd-contrib?q=ejabberd-contrib

 

https://svn.process-one.net/ejabberd-modules/mysql/

 

顶好文章

https://gist.github.com/jbottigliero/3955492

你可能感兴趣的:(ejabberd mysql)