[SR-Users] driver error: Can't connect to MySQL server with kamailio 5.3.x and mysql-config-groups

Karsten Horsmann khorsmann at gmail.com
Tue Oct 22 14:58:31 CEST 2019


Hi List,

i updated one of my testing kamailios from 5.2.x to latest 5.3.x.
After restarting the process, i got an mysql error that the server
"kamailio" is not found.

I use the config-feature of my.cnf config-group names within the
kamailio.cfg
I can start my kamailio 5.3.x installation with "normal
username:password at host" definitions for DBURL.

Did anyone have the same issue?


 0(19625) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection():
driver error: Can't connect to MySQL server on 'kamailio' (4)
 0(19625) ERROR: <core> [db.c:319]: db_do_init2(): could not add connection
to the pool
 0(19625) ERROR: dialplan [dp_db.c:179]: dp_connect_db(): unable to connect
to the database
 0(19625) ERROR: dialplan [dialplan.c:191]: mod_init(): could not
initialize data
 0(19625) ERROR: <core> [core/sr_module.c:850]: init_mod(): Error while
initializing module dialplan (/usr/lib64/kamailio/modules/dialplan.so)
ERROR: error while initializing modules


from my kamailio.cfg i defined the DBURL like this:

# Use /etc/my.cnf.d/kamailio.cnf to store credentials
# within a mysql-db-group
#!define DBURL "mysql://[kamailio]/kamailio"

and special modules can use it like this (or via DBURL)
modparam("sqlops", "sqlcon", "cb=>mysql://[kamailio]/kamailio")

cat /etc/my.cnf.d/kamailio.cnf

# MySQL configuration group for kamailio
[kamailio]
user=kamailio
password="kamailiorw"
host=172.20.100.22


rpm -qa | grep kam
kamailio-dialplan-5.3.0-13.1.x86_64
kamailio-websocket-5.3.0-13.1.x86_64
kamailio-jansson-5.3.0-13.1.x86_64
kamailio-mysql-5.3.0-13.1.x86_64
kamailio-tls-5.3.0-13.1.x86_64
kamailio-ims-5.3.0-13.1.x86_64
kamailio-statsd-5.3.0-13.1.x86_64
kamailio-5.3.0-13.1.x86_64
kamailio-redis-5.3.0-13.1.x86_64

 cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

-- 
Cheers
*Karsten Horsmann*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191022/9a9e3738/attachment.html>


More information about the sr-users mailing list