Load the latest Ejabberd module SVN co https://svn.process-one.net/ejabberd-modules installation Module CD./ejabberd-modules/mod_archive/ Trunk
./build.sh copy Ebin to ejabberd module library CP ebin/*.beam/usr/local/ejabberd/lib/ejabberd/ebin Modify EJABBERD.CFG {MOD_ARCHIVE_ODBC , [
{database_type, "MySQL"},
{Default_auto_save, true},
{Enforce_default_auto_save, false},
{Default_expire, infinity},
{enforce_min_expire, 0},
{Enforce_max_expire, infinity},
{replication_expire, 31536000},
{session_duration, 1800},
{wipeout_interval, 86400}] }, add the above to the module to import the data structure mysql> source Src/mod_archive_odbc_mysql.sql Note: For the first row of the SQL file set Table_type=innodb, you may get an error when executing , I test using MySQL5.5, can modify into set Default_storage_engine=innodb restart Ejabberd, try to chat, in the Ejabberd database has archive_messages table will save the chat record