<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.avgcert, li.avgcert, div.avgcert
        {mso-style-name:avgcert;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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.
;)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>S.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org] <b>On
Behalf Of </b>Duane Larson<br>
<b>Sent:</b> Wednesday, June 01, 2011 12:17 PM<br>
<b>To:</b> OpenSIPS users mailling list<br>
<b>Subject:</b> Re: [OpenSIPS-Users] CDRTool - MySQL Database error: Invalid
SQL:<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>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.<o:p></o:p></p>
<div>
<p class=MsoNormal>On Wed, Jun 1, 2011 at 2:14 PM, Adrian Georgescu <<a
href="mailto:ag@ag-projects.com">ag@ag-projects.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>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.<br>
<br>
Adrian<br>
<br>
On Jun 1, 2011, at 9:05 PM, osiris123d wrote:<br>
<br>
> Figured out the issue but it doesn't make sense. From my last post
it<br>
> appeared that when mysql was querying for the radacct201106 table it was<br>
> looking in the cdrtool database. Well when I set up cdrtool's
global.inc<br>
> config I made it so that cdradmin mysql user was used to log into the<br>
> cdrtool database and also the radius database. Here is an example of
what I<br>
> had<br>
><br>
> class DB_CDRTool extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "cdrtool";<br>
> var $User = "cdradmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_Locker extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "cdrtool";<br>
> var $User = "locker";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_radius extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "radius";<br>
> var $User = "cdradmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_opensips extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "opensips";<br>
> var $User = "opensips";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_mediaproxy extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "mediaproxy";<br>
> var $User = "cdradmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
><br>
><br>
><br>
> Originally I had the radius database user as "radius", but when
I tried to<br>
> create that user in mysql it wouldn't let me (maybe because there is a<br>
> database called radius, not sure). So I figured I would just use the<br>
> cdradmin user for everything except for opensips database. Well when
I<br>
> changed the cdrtool config to the following it is now about to do CDR<br>
> searches<br>
><br>
><br>
> class DB_CDRTool extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "cdrtool";<br>
> var $User = "cdradmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_Locker extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "cdrtool";<br>
> var $User = "locker";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_radius extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "radius";<br>
> var $User = "radadmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_opensips extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "opensips";<br>
> var $User = "opensips";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
> }<br>
><br>
> class DB_mediaproxy extends DB_Sql {<br>
> var $Host = "127.0.0.1";<br>
> var $Database = "mediaproxy";<br>
> var $User = "cdradmin";<br>
> var $Password = "*";<br>
> var $Halt_On_Error ="yes";<br>
><br>
><br>
> So it all appears to be good now, but I figured I should have still been<br>
> able to use the cdradmin user for both databases. For some reason
CDRTool<br>
> was looking in the cdrtool database for the radacct201106.<br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a
href="http://opensips-open-sip-server.1449251.n2.nabble.com/CDRTool-MySQL-Database-error-Invalid-SQL-tp6427865p6428379.html"
target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/CDRTool-MySQL-Database-error-Invalid-SQL-tp6427865p6428379.html</a><br>
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
--<br>
*--*--*--*--*--*<br>
Duane<br>
*--*--*--*--*--*<br>
--<o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=1 width="100%" noshade style='color:#ACA899' align=center>
</div>
<p class=avgcert>No virus found in this message.<br>
Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>
Version: 10.0.1375 / Virus Database: 1511/3673 - Release Date: 06/01/11<o:p></o:p></p>
</div>
</body>
</html>