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

Skyler skchopperguy at gmail.com
Wed Jun 1 21:32:08 CEST 2011


Wow what timing. I was just about to do my first CDRTool install but haven't
started yet.now I can avoid this headache completely. ;)

 

S.

 

From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Duane Larson
Sent: Wednesday, June 01, 2011 12:17 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] CDRTool - MySQL Database error: Invalid SQL:

 

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
*--*--*--*--*--*
--

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1375 / Virus Database: 1511/3673 - Release Date: 06/01/11

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


More information about the Users mailing list