<div dir="ltr">try configuring it with root, if that works, then your user was not created properly...</div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&type=zerocontent&guid=a5e434d1-1c60-447d-90e9-8ebd52be255a"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div>
<br><div class="gmail_quote">On Wed, May 10, 2017 at 9:32 AM, Донат Зеничев <span dir="ltr"><<a href="mailto:donat.zenichev@gmail.com" target="_blank">donat.zenichev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">https://kamailio.org/docs/<wbr>modules/4.3.x/modules/db_<wbr>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" target="_blank">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" target="_blank">http://wnet.ua</a></div><div>>></div><div>>> ______________________________<wbr>_________________</div><div>>> Kamailio (SER) - Users Mailing List</div><div>>> sr-users at <a href="http://lists.kamailio.org" target="_blank">lists.kamailio.org</a></div><div>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a></div><div>>></div><div>></div><div>></div><div>></div><div>>-- </div><div>>Best regards,</div><div>></div><div>>Glenn O. Larsen</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-8112972112960942923gmail_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>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>