When you have sql_server defined as an IP address, e.g.: sql_type: mssql You need to haveĪlso, in some cases you need to add machine name to sql_username, especially Redis_connect_timeout: N: A number of seconds to wait for the connection to be established to the RedisĮxample configuration: redis_server: įor now, MS SQL is only supported in Unix-like OS'es. Redis_password: String: The password to the Redis server. Redis_port: Port: The port where the Redis server is accepting connections. Redis_server: String: A hostname of the Redis server. Use it to store transient data, such as records for C2S (client) sessions. Redis is an advanced key-value cache and store. You may prefer to set SQL as your default database. You can configure a module to use your databaseīy adding the option db_type: sql to that module.Īlternatively, if you want all modules to use your SQL database when possible, In this sense, if you defined your database access using the Have options called db_type, and can store their tables To store the passwords in SCRAM format instead of plaintext, You can authenticate users against an SQL database, see the option auth_method To configure SQL there are several top-level options:Įxample of plain ODBC connection: sql_server: "DSN=database UID=ejabberd PWD=password"Įxample of MySQL connection: sql_type: mysql The two native interface available, PostgreSQL or MySQL. The values are used to define if we want to use ODBC, or one of The actual database access is defined in the options with sql_ Update_sql command: ejabberdctl update_sql Then restart ejabberd, and finally execute the In your ejabberd configuration: new_sql_schema: true Then enable the new_sql_schema option in the ejabberd configuration, If you already have a MySQL or PostgreSQL database with the default schema and contents,Įdit the file sql/ which is included with ejabberd,Īnd import that SQL file in your database. If you are using PostgreSQL and need the new schema, use pg.new.sql. Now, when creating the new database, remember to use the proper SQL schema!įor example, if you are using MySQL and choose the default schema, use mysql.sql. New_sql_schema top-level option: new_sql_schema: true To use the new schema, edit the ejabberd configuration file and enable However, if you have only one massive domain, you may prefer to use the default schema. Using this schema is preferable when serving several XMPP domains So it allows to handle several XMPP domains in a single ejabberd database. The new schema stores the XMPP domain in a new column server_host So in that case you may prefer the new schema. You have to setup one database per domain Is not stored as this is the same for all the accounts,Īnd this saves space in massive deployments. The default schema stores only one XMPP domain in the database. The new schema is preferable when serving many small domains. The default schema is preferable when serving one massive domain, There are two database schemas available in ejabberd: Relational Databases Default and New Schemas You can simplify the configuration by setting the default database.ĭefault_db: mnesia|sql: This will define the default database for a module lacking db_type option or if auth_method option is not set. Sql_database: database-public-example-org Sections must be set inside a host_config for each vhost (see section For that purpose, the options described in the next Virtual host uses a different configuration of database, authenticationĪnd storage, so that usernames do not conflict and mix between different Important note about virtual hosting: if you define several domains inĮjabberd.yml (see section Host Names), you probably want that each If using MySQL or PostgreSQL, you can choose between theįor details on database schemas. In the ejabberd's installation path under /lib/ejabberd*/priv/sql If installing ejabberd from Process-One installer, the init scripts are located By default: /usr/local/lib/ejabberd/priv/sql If installing ejabberd from sources, you will find sql script for your backend You must create the schema before you run ejabberd. If you plan to use MySQL, PostgreSQL, MS SQL or SQLite, When using external database backend, ejabberd does not create schema and tablesīy itself. Section for documentation about using LDAP. Check the tutorial Using ejabberd with MySQL The following databases are supported by ejabberd: Storage systems for modules, and so forth. Mechanisms for the same virtual host (fallback), you can set different ejabberd is veryįlexible: you can configure different authentication methods forĭifferent virtual hosts, you can configure different authentication Server to store persistent, long-living data. Possible to use a relational database, key-value storage or an LDAP Ejabberd uses its internal Mnesia database by default.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |