<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>For example, in dialog module:</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><div class="titlepage"><h3 class="title" style="font-style: italic; border: 1px solid rgb(192, 192, 192); padding-left: 5px;"><font size="3"><span style="background-color: rgba(255, 255, 255, 0);">5.10. <code class="varname">db_url</code> (string)</span></font></h3></div><p style="text-align: start;"><span style="background-color: rgba(255, 255, 255, 0);">If you want to store the information about the dialogs in a database, a database URL must be specified.</span></p><p style="text-align: start;"><span class="emphasis" style="background-color: rgba(255, 255, 255, 0);"><em>Default value is <span class="quote">“<span class="quote">mysql://kamailio:kamailiorw@localhost/kamailio</span>”</span>.</em></span></p><div class="example" style="border: thin dotted rgb(112, 170, 229); padding-left: 10px; padding-right: 10px; overflow: auto; border-top-left-radius: 2.5px; border-top-right-radius: 2.5px; border-bottom-right-radius: 2.5px; border-bottom-left-radius: 2.5px;"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><a id="idp52992"></a></span></font><p class="title" style="text-align: start;"><strong style="background-color: rgba(255, 255, 255, 0);">Example 1.10. Set <code class="varname">db_url</code> parameter</strong></p><div class="example-contents"><pre class="programlisting" style="border: 1px solid rgb(153, 204, 204); padding-left: 15pt; overflow: auto; border-top-left-radius: 2.5px; border-top-right-radius: 2.5px; border-bottom-right-radius: 2.5px; border-bottom-left-radius: 2.5px;"><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">...
modparam("dialog", "db_url", "dbdriver://username:password@dbhost/dbname")
...</span></font></pre><div><br></div></div></div><br>Diego</div><div><br>El 10 may. 2017, a las 07:27, Diego Nadares <<a href="mailto:dnadares@gmail.com">dnadares@gmail.com</a>> escribió:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Hi,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Your db_url in kamailio.cfg for the module you are using is correct?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Cheers,<br><br>Diego</div><div><br>El 10 may. 2017, a las 04:32, Донат Зеничев <<a href="mailto:donat.zenichev@gmail.com">donat.zenichev@gmail.com</a>> escribió:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Yes, I saw this part of kamailio doc, and even I added this part in my.cnf:</div><div><div>[kamailio]</div><div>socket = /path/to/mysql.sock</div><div>user = kamailiouser</div><div>password = kamailiopass</div><div>default-character-set = utf8</div></div><div><br></div><div>(with valid password) it didn't help me (of course I restarted the mysqld).</div><div><br></div><div>Both of the following syntax worked fine for me:</div><div><div># mysql --user=xxx --password=xx --host=localhost --protocol=tcp <database></div><div># mysql --user=xxx --password=xx --protocol=socket <database></div></div><div><br></div><div>So that, I could get into a mysql console (with kamailioro user/pasword).</div><div><br></div><div>I mentioned in a previous message, that Kamailio is installed from repository and is not compiled.</div><div>But, kamailio-mysql-modules:amd64 is installed.</div><div><br></div><div>So looks, like there is no problem with socket connection, because kamailio doesn't say that problem depends on mysql module, it said that problem consists of accessing for kamailioro user.</div><div><br></div><div>>Hi,</div><div>></div><div>>So, I have not been using Kamailio with MySQL before, but I do have</div><div>>some basic MySQL knowledge.</div><div>></div><div>>MySQL can be used with both socket and TCP, have you verified that</div><div>>your setup is matching the server setup.</div><div>></div><div>>Have you look at this section:</div><div>><a href="https://kamailio.org/docs/modules/4.3.x/modules/db_mysql.html#idp3037648">https://kamailio.org/docs/modules/4.3.x/modules/db_mysql.html#idp3037648</a></div><div>></div><div>>You can also test/check that socket/tcp is working by testing it like this:</div><div>># mysql --user=xxx --password=xx --host=localhost --protocol=tcp <database></div><div>># mysql --user=xxx --password=xx --protocol=socket <database></div><div>></div><div>></div><div>>On Fri, May 5, 2017 at 4:47 PM, Донат Зеничев <donat.zenichev at <a href="http://gmail.com">gmail.com</a>> wrote:</div><div>>> Hi.</div><div>>></div><div>>> I have just written routing logic for my new sip-proxy server, but have a</div><div>>> problem with start of kamailio.</div><div>>></div><div>>> ./kamailio.cfg file has no mistakes - it's made well done.</div><div>>></div><div>>> before to start coding with routing logic, of course I installed kamailio</div><div>>> (ver 4.3.4) from repository.</div><div>>> OS - ubuntu 16.04</div><div>>></div><div>>> and add next modules from repository:</div><div>>> kamailio-mysql-modules:amd64</div><div>>> kamailio-perl-modules:amd64</div><div>>> kamailio-radius-modules:amd64</div><div>>> kamailio-tls-modules:amd64</div><div>>> kamailio-utils-modules:amd64</div><div>>></div><div>>> next step, I edited the ./kamctlrc file to contain proper user/password and</div><div>>> mysql engine settings.</div><div>>> And than, ran the kamdbctl create (without special parameters).</div><div>>></div><div>>> A bit about my kamailio.cfg :</div><div>>> fork=yes</div><div>>> children=4</div><div>>> disable_tcp=no</div><div>>> tcp_children=4</div><div>>> tcp_send_timeout=3</div><div>>> tcp_connect_timeout=5</div><div>>> tcp_connection_lifetime=3600</div><div>>> tcp_max_connections=4096</div><div>>></div><div>>> of course mpath is defined and proper modparams (depending on my ver) for</div><div>>> modules are used.</div><div>>></div><div>>> A bit about my kamctlrc:</div><div>>> Ro and rw user are defined (and connections to needed db from these users is</div><div>>> checked, as like it was real kamailio that tries to update some values in db</div><div>>> - well done).</div><div>>></div><div>>> Also PID_FILE and FIFOPATH are defined (/var/run/kamailio dir. created)</div><div>>></div><div>>> So that, now I'm trying to start the server as a daemon, I have the</div><div>>> following row in systemctl:</div><div>>> ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error:</div><div>>> Access denied for user 'kamailioro'@'localhost' (using password: YES)</div><div>>></div><div>>> And of course all other modules can't run because they depend on the db</div><div>>> connections.</div><div>>> So looks like very simple problem, just need to edit mysql user table to</div><div>>> have proper passwords.</div><div>>></div><div>>> But I've refurbished ro and rw user several times, it didn't help me.</div><div>>> Also tried to drop kamailio db with db users and run kamdbctl create again -</div><div>>> nothing changed.</div><div>>></div><div>>> I tried to find where kamailioro user can be defined as default, but didn't</div><div>>> find any files (apart of kamctlrc in /etc/kamailio directory).</div><div>>> /etc/default/kamailio file contains proper values and paths.</div><div>>></div><div>>> Please advise something.</div><div>>></div><div>>></div><div>>></div><div>>> --</div><div>>> --</div><div>>> BR, Donat Zenichev</div><div>>> Wnet VoIP team</div><div>>> Tel:  +380(44) 5-900-808</div><div>>> <a href="http://wnet.ua">http://wnet.ua</a></div><div>>></div><div>>> _______________________________________________</div><div>>> Kamailio (SER) - Users Mailing List</div><div>>> sr-users at <a href="http://lists.kamailio.org">lists.kamailio.org</a></div><div>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></div><div>>></div><div>></div><div>></div><div>></div><div>>-- </div><div>>Best regards,</div><div>></div><div>>Glenn O. Larsen</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span>-- <br></span>BR, Donat Zenichev
<br>Wnet VoIP team
<br>Tel:  +380(44) 5-900-808
<br><a href="http://wnet.ua" target="_blank">http://wnet.ua</a></div></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br><span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></div></blockquote></body></html>