[sr-dev] How to enable SSL in kamailio mysql db connectivity

Jeetha P J jeetha.j at quantiphi.com
Mon Jun 27 08:55:45 CEST 2022


Hi Team,

 We have SSL in mySQL DB.So I need to add configuration in kamailio also.I
am adding the configuration I tried. Please help me to achieve this.Its
little urgent.

My /etc/mysql/my.cnf
[client]
socket = /run/mysqld/mysqld.sock
ssl_key=/var/lib/mysql/Quant-certs/client-key.pem
ssl_cert=/var/lib/mysql/Quant-certs/client_ca_cert.pem
ssl_ca=/var/lib/mysql/Quant-certs/server-ca.pem
#require_secure_transport = ON

[kamailio]
socket = /run/mysqld//mysqld.sock
#require_secure_transport = ON
user = kamailio
password = kamailiorw
host=xxx.xxx.xxx.xxx
default-character-set = utf8
ssl_key=/var/lib/mysql/Quant-certs/client-key.pem
ssl_cert=/var/lib/mysql/Quant-certs/client_ca_cert.pem
ssl_ca=/var/lib/mysql/Quant-certs/server-ca.pem
ssl_verify=1

/etc/kamailio/kamailio.cfg

#!ifndef DBURL
#!define DBURL "mysql://kamailio:kamailiorw@xx.xx.xxx.xxx/kamailio"
#!endif

gateqeeper-kam-dev kamailio[7879]:  0(7879) DEBUG: db_mysql
[km_my_con.c:107]: db_mysql_new_connection(): opening connection:
mysql://xxxx:xxxx@xx.xxx.xx.xxx/kamailio
Jun 27 06:53:12 gateqeeper-kam-dev kamailio[7879]:  0(7879) ERROR: db_mysql
[km_my_con.c:139]: db_mysql_new_connection(): driver error: Access denied
for user 'kamailio'@'xx.xxx.xx.xx' (using password: YES)

Please help me to get it solved.

Thanks & Regards
Jeetha P J

-- 
_This message contains information that may be privileged or confidential 
and is the property of the Quantiphi Inc and/or its affiliates_. It is 
intended only for the person to whom it is addressed. _If you are not the 
intended recipient, any review, dissemination, distribution, copying, 
storage or other use of all or any portion of this message is strictly 
prohibited. If you received this message in error, please immediately 
notify the sender by reply e-mail and delete this message in its 
*entirety*___
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220627/c4747f52/attachment.htm>


More information about the sr-dev mailing list