[OpenSIPS-Users] CDRTool - MySQL Database error: Invalid SQL:

Adrian Georgescu ag at ag-projects.com
Wed Jun 1 22:04:16 CEST 2011


Is good to separate them anyway for monitoring the number of different connections to various databases.

Adrian
 
On Jun 1, 2011, at 9:16 PM, Duane Larson wrote:

> Thanks Adrian.  Took a little while to figure out, but it's probably best to use different credentials anyway from a security standpoint.  Got to love bugs.
> 
> On Wed, Jun 1, 2011 at 2:14 PM, Adrian Georgescu <ag at ag-projects.com> wrote:
> Seems to be a php bug that cannot correctly identify the different connections in a mysql pool. Work around it by using different credentials/database combinations.
> 
> Adrian
> 
> On Jun 1, 2011, at 9:05 PM, osiris123d wrote:
> 
> > Figured out the issue but it doesn't make sense.  From my last post it
> > appeared that when mysql was querying for the radacct201106 table it was
> > looking in the cdrtool database.  Well when I set up cdrtool's global.inc
> > config I made it so that cdradmin mysql user was used to log into the
> > cdrtool database and also the radius database.  Here is an example of what I
> > had
> >
> > class DB_CDRTool extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "cdrtool";
> >  var $User     = "cdradmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_Locker extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "cdrtool";
> >  var $User     = "locker";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_radius extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "radius";
> >  var $User     = "cdradmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_opensips extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "opensips";
> >  var $User     = "opensips";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_mediaproxy extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "mediaproxy";
> >  var $User     = "cdradmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> >
> >
> >
> > Originally I had the radius database user as "radius", but when I tried to
> > create that user in mysql it wouldn't let me (maybe because there is a
> > database called radius, not sure).  So I figured I would just use the
> > cdradmin user for everything except for opensips database.  Well when I
> > changed the cdrtool config to the following it is now about to do CDR
> > searches
> >
> >
> > class DB_CDRTool extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "cdrtool";
> >  var $User     = "cdradmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_Locker extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "cdrtool";
> >  var $User     = "locker";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_radius extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "radius";
> >  var $User     = "radadmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_opensips extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "opensips";
> >  var $User     = "opensips";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> > }
> >
> > class DB_mediaproxy extends DB_Sql {
> >  var $Host     = "127.0.0.1";
> >  var $Database = "mediaproxy";
> >  var $User     = "cdradmin";
> >  var $Password = "*";
> >  var $Halt_On_Error ="yes";
> >
> >
> > So it all appears to be good now, but I figured I should have still been
> > able to use the cdradmin user for both databases.  For some reason CDRTool
> > was looking in the cdrtool database for the radacct201106.
> >
> >
> >
> > --
> > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CDRTool-MySQL-Database-error-Invalid-SQL-tp6427865p6428379.html
> > Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> -- 
> --
> *--*--*--*--*--*
> Duane
> *--*--*--*--*--*
> --
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110601/8701a1e1/attachment.htm>


More information about the Users mailing list