[asterisk-users] MySQL cmd

Tilghman Lesher tlesher at digium.com
Mon Sep 21 17:22:07 CDT 2009


On Monday 21 September 2009 03:37:03 pm Anahi Ludueña wrote:
> Hi people, I'm trying to retrieve data from the database (server MySQL).
> I have the following dial plan:
>
> exten => s,1,Noop(Start)
> exten => s,n,MYSQL(Connect connid localhost user pass asteriskcdrdb)
> exten => s,n,Noop(Connid: ${connid})
> ...
>
> The problem is that the 3º line is not showing the connid. How can I know
> the error? Thanks,

The typical problem here is in the socket file being in the wrong place.  Make
sure that the path of the socket file is specified in /etc/my.cnf (or
/etc/mysql/my.cnf).  The socket should be specified in the "[client]" section.
Ensure that the corresponding path exists.

If you've enabled TCP connections on the host, you could also change the word
'localhost' to '127.0.0.1', as this will force MySQL to use the TCP layer for
connecting, instead of the socket file.

There should also be a corresponding WARNING printed to the console (and to
the messages log) as to the particular MySQL error.

-- 
Tilghman



More information about the asterisk-users mailing list