ejabberd - Comments for "mod_roster_obdc and virtual hosts" https://www.ejabberd.im/node/2686 en Ah, I didn't think about https://www.ejabberd.im/node/2686#comment-51187 <p>Ah, I didn't think about that. You are right, each ODBC database can only be used for a single vhost.</p> <p>If you have several vhosts, the solution is to use several databases. Create them using the same method than the first one. And then configure ejabberd to use a database for each host. For example:</p> <pre>{host_config, "example.org", [ {odbc_server, {mysql, "localhost", "ejabberd_org", "usernameee", "passworddd"}}. ]}. {host_config, "example.com", [ {odbc_server, {mysql, "localhost", "ejabberd_com", "usernameee", "passworddd"}}. ]}.</pre> Tue, 06 Nov 2007 23:50:16 +0000 mfoss comment 51187 at https://www.ejabberd.im username not include server https://www.ejabberd.im/node/2686#comment-51185 <p>username not include server name<br /> and JID it is member jid of roster for user with given username</p> <p>so, trouble exists</p> Tue, 06 Nov 2007 17:46:28 +0000 vinnitu comment 51185 at https://www.ejabberd.im But the key of the table https://www.ejabberd.im/node/2686#comment-51184 <p>But the key of the table includes the Username and the JID, right? Since the JID includes the server, the problem should not exist. </p> <p>This is also described in the database schema:</p> <div class="quote-msg"> <div class="quote-author"><em>src/odbc/mysql.sql</em> wrote:</div> <p>CREATE TABLE rosterusers (<br /> username varchar(250) NOT NULL,<br /> jid varchar(250) NOT NULL,<br /> nick text NOT NULL,<br /> subscription character(1) NOT NULL,<br /> ask character(1) NOT NULL,<br /> askmessage text NOT NULL,<br /> server character(1) NOT NULL,<br /> subscribe text NOT NULL,<br /> type text<br /> ) CHARACTER SET utf8;</p> <p>CREATE UNIQUE INDEX i_rosteru_user_jid ON rosterusers(username(75), jid(75));<br /> CREATE INDEX i_rosteru_username ON rosterusers(username);<br /> CREATE INDEX i_rosteru_jid ON rosterusers(jid);</p></div> Tue, 06 Nov 2007 17:30:25 +0000 mfoss comment 51184 at https://www.ejabberd.im