Search code examples
mysqlejabberd

Error in ejabberd custom module to connect with mysql - more details attached


I am trying to connect mysql db from sample mod_hellow_world and for that i followed the below steps..

  1. Added in ejabberd.yml

    sql_type: mysql
    sql_server: "localhost"
    sql_database: "ejabberd"
    sql_username: "admin"
    sql_password: "admin885" 
    
    modules:
         mod_hello_world:
            db_type: sql
    

When i start ejabberd using ./ejabberdctl start Following error received in error.log

 @ejabberd_app:start:72
 Failed to start ejabberd application:
 Invalid value of option modules->mod_hello_world:
 Unknown option: db_type.
 There are no available options

if i remove db_type: sql it works fine... is there any more configuration need to done to connect mysql?


Solution

  • Each module defines what modules can be configured. See functions mod_opt_type and mod_options in many modules.

    In those functions the developer describes what options the module will accept.

    Remember to run "make options" after addinf those functions.