Hi,
So, I have not been using Kamailio with MySQL before, but I do have
some basic MySQL knowledge.
MySQL can be used with both socket and TCP, have you verified that
your setup is matching the server setup.
Have you look at this section:
https://kamailio.org/docs/modules/4.3.x/modules/db_mysql.html#idp3037648
You can also test/check that socket/tcp is working by testing it like this:
# mysql --user=xxx --password=xx --host=localhost --protocol=tcp <database>
# mysql --user=xxx --password=xx --protocol=socket <database>
On Fri, May 5, 2017 at 4:47 PM, Донат Зеничев <donat.zenichev(a)gmail.com> wrote:
Hi.
I have just written routing logic for my new sip-proxy server, but have a
problem with start of kamailio.
./kamailio.cfg file has no mistakes - it's made well done.
before to start coding with routing logic, of course I installed kamailio
(ver 4.3.4) from repository.
OS - ubuntu 16.04
and add next modules from repository:
kamailio-mysql-modules:amd64
kamailio-perl-modules:amd64
kamailio-radius-modules:amd64
kamailio-tls-modules:amd64
kamailio-utils-modules:amd64
next step, I edited the ./kamctlrc file to contain proper user/password and
mysql engine settings.
And than, ran the kamdbctl create (without special parameters).
A bit about my kamailio.cfg :
fork=yes
children=4
disable_tcp=no
tcp_children=4
tcp_send_timeout=3
tcp_connect_timeout=5
tcp_connection_lifetime=3600
tcp_max_connections=4096
of course mpath is defined and proper modparams (depending on my ver) for
modules are used.
A bit about my kamctlrc:
Ro and rw user are defined (and connections to needed db from these users is
checked, as like it was real kamailio that tries to update some values in db
- well done).
Also PID_FILE and FIFOPATH are defined (/var/run/kamailio dir. created)
So that, now I'm trying to start the server as a daemon, I have the
following row in systemctl:
ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error:
Access denied for user 'kamailioro'@'localhost' (using password: YES)
And of course all other modules can't run because they depend on the db
connections.
So looks like very simple problem, just need to edit mysql user table to
have proper passwords.
But I've refurbished ro and rw user several times, it didn't help me.
Also tried to drop kamailio db with db users and run kamdbctl create again -
nothing changed.
I tried to find where kamailioro user can be defined as default, but didn't
find any files (apart of kamctlrc in /etc/kamailio directory).
/etc/default/kamailio file contains proper values and paths.
Please advise something.
--
--
BR, Donat Zenichev
Wnet VoIP team
Tel: +380(44) 5-900-808
http://wnet.ua
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Best regards,
Glenn O. Larsen