i cross checked with the my.cnf file and res_mysql.conf files. The configurations are the same, that is, both the sockets and the bind-addresses are the same.
[quote]es_config_mysql.c:629 mysql_reconnect: MySQL RealTime: Failed to connect database server asterisk on (err 2002). Check debug for more info.
[/quote]
between “on” and “(err 2002)” you should really have the name of whatever you’re trying to connect to.
May I suggest posting the contents of your “res_mysql.conf” & “extconfig.conf”? This will give us a better idea of what it is you have going on here.
We upgraded 1.4 to 1.6.1 and one of issues was with MySQL - helped using little bit different name conventions:
extconfig.conf
[settings]
sipusers=>mysql,asterisk,sip_buddies
res_mysql.conf is as follows:
[asterisk]
dbhost=127.0.0.1
dbname=asterisk
dbuser=root
dbpass=root
dbport=3306
dbsock=/var/run/mysqld/mysqld.sock
You can keep general, but as I understand - in extconfig, database meen context in res_mysql.conf
The first step I’d take is to log into mysql using the username and password as it appears in your configs. Once in, make sure you can do a select on the realtime tables. If not, the problem may lie with table permissions (i.e. you need to use the GRANT commands in mysql".
Assuming you already did that first step, next I suggest you recompile both asterisk and asterisk-addons. When you compile the addons package, make sure you’re not getting an error about libmysqlclient being missing… If you are, you need to add the path to the mysql lib directory int ld.so.conf, then run “ldconfig”.
In the asterisk-addons directory begin by doing a “make distclean” to clean things out a bit, then do “./configure”, followed by “make menuselect”. Be sure you added the mysql extensions in, then do a “make” and "make install.
I’d suggest completely stopping asterisk, then restarting it from scratch so you know for sure that the recently compiled modules are being used. See if that works.