[asterisk-bugs] [JIRA] (ASTERISK-25813) res_config_mysql dbsock parameter
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Thu Feb 25 19:33:56 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Mudgett updated ASTERISK-25813:
---------------------------------------
Description:
I'm struggle with mysql application, specifically dbsock parameter, it WARNING message connection; Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'.
weird issue Asterisk invokes a socket path connection no relationship to any logic configuration, strange whatever make parameters changes such as; dbname, dbuser, dbpass, on res_config_mysql.conf it seems it works, even if detect no database found, Asterisk will use the default values.
But not happens with dbsock parameter, whatever set onto res_config_mysql.conf no meaning Asterisk it doesn't assume any condition and always use the path; '/var/lib/mysql/mysql.sock'.
The most strange point I couldn't found any configuration file to change these default value.
Asterisk 13.1.0 built by root @ Asterisk-SoyoM on a i686 running Linux on 2015-01-16 20:52:42 UTC
res_config_mysql.conf
{noformat}
[general]
dbhost = localhost
dbname = asterisk
dbuser = myuser
dbpass = mypass
dbport = 3306
dbsock = =/var/run/mysqld/mysqld.sock
dbcharset = latin1
requirements=warn ; or createclose or createchar
{noformat}
extensions.conf
{noformat}
[bases]
exten => s,1,MYSQL(Connect connid localhost asterisk mypass credit utf8)
exten => s,2,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
exten => s,3,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2)
exten => s,4,GotoIf(${fetchid}?5:7)
exten => s,5,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
exten => s,6,Goto(s,3)
exten => s,7,MYSQL(Clear ${resultid})
exten => s,8,MYSQL(Disconnect ${connid})
{noformat}
etc/my.conf
{noformat}
[mysqld]
datadir=/var/lib/mysql
bind-address =localhost
socket=/var/run/mysql/mysql.sock
skip-networking
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
host=localhost
socket=/var/run/mysql/mysql.sock
{noformat}
was:
I'm struggle with mysql application, specifically dbsock parameter, it WARNING message connection; Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'.
weird issue Asterisk invokes a socket path connection no relationship to any logic configuration, strange whatever make parameters changes such as; dbname, dbuser, dbpass, on res_config_mysql.conf it seems it works, even if detect no database found, Asterisk will use the default values.
But not happens with dbsock parameter, whatever set onto res_config_mysql.conf no meaning Asterisk it doesn't assume any condition and always use the path; '/var/lib/mysql/mysql.sock'.
The most strange point I couldn't found any configuration file to change these default value.
Asterisk 13.1.0 built by root @ Asterisk-SoyoM on a i686 running Linux on 2015-01-16 20:52:42 UTC
res_config_mysql.conf
[general]
dbhost = localhost
dbname = asterisk
dbuser = myuser
dbpass = mypass
dbport = 3306
dbsock = =/var/run/mysqld/mysqld.sock
dbcharset = latin1
requirements=warn ; or createclose or createchar
extensions.conf
[bases]
exten => s,1,MYSQL(Connect connid localhost asterisk mypass credit utf8)
exten => s,2,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
exten => s,3,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2)
exten => s,4,GotoIf(${fetchid}?5:7)
exten => s,5,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
exten => s,6,Goto(s,3)
exten => s,7,MYSQL(Clear ${resultid})
exten => s,8,MYSQL(Disconnect ${connid})
etc/my.conf
[mysqld]
datadir=/var/lib/mysql
bind-address =localhost
socket=/var/run/mysql/mysql.sock
skip-networking
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
host=localhost
socket=/var/run/mysql/mysql.sock
> res_config_mysql dbsock parameter
> ----------------------------------
>
> Key: ASTERISK-25813
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25813
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Addons/res_config_mysql
> Affects Versions: 13.1.0
> Reporter: Mc GRATH Ricardo
>
> I'm struggle with mysql application, specifically dbsock parameter, it WARNING message connection; Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'.
> weird issue Asterisk invokes a socket path connection no relationship to any logic configuration, strange whatever make parameters changes such as; dbname, dbuser, dbpass, on res_config_mysql.conf it seems it works, even if detect no database found, Asterisk will use the default values.
> But not happens with dbsock parameter, whatever set onto res_config_mysql.conf no meaning Asterisk it doesn't assume any condition and always use the path; '/var/lib/mysql/mysql.sock'.
> The most strange point I couldn't found any configuration file to change these default value.
> Asterisk 13.1.0 built by root @ Asterisk-SoyoM on a i686 running Linux on 2015-01-16 20:52:42 UTC
> res_config_mysql.conf
> {noformat}
> [general]
> dbhost = localhost
> dbname = asterisk
> dbuser = myuser
> dbpass = mypass
> dbport = 3306
> dbsock = =/var/run/mysqld/mysqld.sock
> dbcharset = latin1
> requirements=warn ; or createclose or createchar
> {noformat}
> extensions.conf
> {noformat}
> [bases]
> exten => s,1,MYSQL(Connect connid localhost asterisk mypass credit utf8)
> exten => s,2,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
> exten => s,3,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2)
> exten => s,4,GotoIf(${fetchid}?5:7)
> exten => s,5,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
> exten => s,6,Goto(s,3)
> exten => s,7,MYSQL(Clear ${resultid})
> exten => s,8,MYSQL(Disconnect ${connid})
> {noformat}
> etc/my.conf
> {noformat}
> [mysqld]
> datadir=/var/lib/mysql
> bind-address =localhost
> socket=/var/run/mysql/mysql.sock
> skip-networking
> user=mysql
> # Disabling symbolic-links is recommended to prevent assorted security risks
> symbolic-links=0
> [mysqld_safe]
> log-error=/var/log/mysqld.log
> pid-file=/var/run/mysqld/mysqld.pid
> [client]
> host=localhost
> socket=/var/run/mysql/mysql.sock
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list