I have been trying to learn Linux (Debian) and Asterisk over the past few weeks. I am trying to setup asterisk to use Realtime for my extensions. I have followed the popular tutorials.
When i load asterisk
asterisk -rvvvvv
I get a nice "Binding extensions to mysql/asterisk/extensions_table"
and it makes me think i am doing something right
but when i place a call i get several:
Sep 9 18:42:44 ERROR[15737]: res_config_mysql.c:651 mysql_reconnect: MySQL Real Time: Failed to connect database server asterisk on (err 2002). Check debug for more info.
i have checked the error logs and found;
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database user found, using ‘asterisk’ as default.
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database password found, using ‘asterisk’ as default.
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database host found, using localhost via socket.
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database name found, using ‘asterisk’ as default.
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database port found, using 3306 as default.
Sep 9 18:38:33 WARNING[15678] res_config_mysql.c: MySQL RealTime: No database socket found, using ‘/tmp/mysql.sock’ as default.
but i have the right info in my res_mysql.conf
[general]
dbhost = 127.0.0.1 (i have also tried localhost)
dbname = asterisk
dbuser = root (using root to rule our other issues)
dbpass = ####
dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock (this is the location mysql is set to store the *.sock file)
Does any one have any ideas why the error log says stuff like No databse user found. it is set in my res_mysql.conf file???
One thing i thought was odd… when i search for (find / -name) mysql.sock it can’t locate it.
same thing with the res_config_mysql.c that the error log mentions
I hope there is some one who can help, thanks!