Re: [Sqlrelay-discussion] connect to sqlrelay (via mysql)
Brought to you by:
mused
From: David M. <dav...@fi...> - 2011-12-29 08:08:35
|
Thomas, I see that you have debugging turned on... I recently fixed a bug that could cause this behavior if debugging of the connection is enabled. The fix is in CVS. A workaround is to disable debugging of the connection in the sqlrelay.conf file. Set debug="none" or debug="listener" but not debug="listener_and_connection" or debug="connection". You can also apply this fix directly. Edit src/connection/sqlrconnection/returnresultsetdata.C and around line 67 you should see code like: cursor->returnRow(); if (dbgfile.debugEnabled()) { debugstr=new stringbuffer(); dbgfile.debugPrint("connection",3, debugstr->getString()); delete debugstr; } change it to: if (dbgfile.debugEnabled()) { debugstr=new stringbuffer(); } cursor->returnRow(); if (dbgfile.debugEnabled()) { dbgfile.debugPrint("connection",3, debugstr->getString()); delete debugstr; } Let me know if that takes care of the problem or not. Dave dav...@fi... On 12/05/2011 03:19 AM, Thomas Stein wrote: > Am 02.12.11 19:29, schrieb David Muse: >> Hi Thomas, > Hi David. > >> I have recently done a LOT of work on the MySQL drop-in replacement >> library. MySQL recently made a bunch of changes under-the-hood and I >> had to make changes to keep up with them. It's possible that the >> problem you are encountering is a result of all that. Try the code in >> CVS and see if it works better. >> >> Here are the instructions for checking out the code from CVS: >> >> export >> CVSROOT=:pserver:ano...@sq...:/cvsroot/sqlrelay >> cvs login >> cvs checkout sqlrelay >> >> First though, try explicitly using the socket parameter with the mysql >> program: >> >> app1 / # mysql -h localhost -P 9000 --socket=/tmp/mysqltest.socket >> --user=user1 --password=password1 > Hm. Tried the cvs version but still the same: > > app1 etc # mysql -h localhost -P 9000 --socket=/tmp/mysqltest.socket > --user=user1 --password=password1 > Welcome to the MySQL monitor. Commands end with ; or \g. > Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.7369 > (pid=7303) Abnormal termination: signal 11 received > Your MySQL connection id is 0 > Server version: 5.1.22 > > Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. > This software comes with ABSOLUTELY NO WARRANTY. This is free software, > and you are welcome to modify and redistribute it under the GPL v2 license > > Type 'help;' or '\h' for help. Type '\c' to clear the current input > statement. > > mysql> show databases; > app1 etc # > > By the way. What exactly ist the sqlrelay.dtd for? I really didn't > figured that out. > > cheers > t. > >> I think recent versions of mysql fall back to a default socket of >> /tmp/mysql.sock (or something like that) and ignore the specified port >> if the file exists. So, in effect, without specifying the port, the >> mysql program ends up trying to talk to the mysql server rather than SQL >> Relay, but using the SQL Relay protocol. >> >> Let me know if you run into any issues. >> >> David Muse >> dav...@fi... >> >> On 12/02/2011 10:35 AM, Thomas Stein wrote: >>> Am 02.12.11 16:03, schrieb Thomas Stein: >>>> Hello. >>>> >>>> First of all. Interesting piece of software! >>>> >>>> And now my first question. >>>> >>>> I am able to use: >>>> >>>> app1 etc # query 127.0.0.1 9000 /tmp/mysqltest.socket user1 password1 >>>> "show databases;" >>>> "information_schema" >>>> "oxid45" >>>> "oxidsample" >>>> app1 etc # >>>> >>>> But is it also possible to connect via regular mysql command to >>>> sqlrelay? Something like: >>>> >>>> app1 etc # mysql -h 127.0.0.1 -P 9000 -uuser1 -ppasswrd1 >>>> >>>> Is that possible at all? I think i didn't understand that part. Any help >>>> appreciated. >>> Answering my question. Yes it is possible. But now i have another problem: >>> >>> LD_PRELOAD=/usr/local/firstworks/lib/libmysql51sqlrelay.so >>> export LD_PRELOAD >>> >>> app1 / # mysql -h localhost -P 9000 --user=user1 --password=password1 >>> Welcome to the MySQL monitor. Commands end with ; or \g. >>> Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.3484 >>> (pid=3469) Abnormal termination: signal 11 received >>> Your MySQL connection id is 0 >>> Server version: 5.1.22 >>> >>> Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. >>> This software comes with ABSOLUTELY NO WARRANTY. This is free software, >>> and you are welcome to modify and redistribute it under the GPL v2 license >>> >>> Type 'help;' or '\h' for help. Type '\c' to clear the current input >>> statement. >>> >>> mysql> >>> >>> The connection seems immediately broken. >>> /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.3484 shows no >>> errors but the client connection seem to remain: >>> >>> app1 / # sqlr-status -id oxidtest >>> Warning: using default connectionid. >>> Open Server Connections: 3 >>> Opened Server Connections: 3 >>> >>> Open Client Connections: 1 >>> Opened Client Connections: 1 >>> >>> Open Server Cursors: 15 >>> Opened Server Cursors: 15 >>> >>> Times New Cursor Used: 1 >>> Times Cursor Reused: 0 >>> >>> Total Queries: 0 >>> Total Errors: 0 >>> >>> Forked Listeners: 0 >>> >>> Scaler's view: >>> Connections: 2 >>> Sessions: 1 >>> >>> Semaphores: >>> +---------------------------------------------+ >>> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | >>> +---+---+---+---+---+---+---+---+---+---+-----+ >>> | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | >>> +---------------------------------------------+ >>> >>> app1 / # >>> >>> Hm. >>> >>> >>>> best regards >>>> thomas >>>> >>>> >>>> Thomas Stein >>>> Systems Engineer >>>> >>> Thomas Stein >>> Systems Engineer >>> >> >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure >> contains a definitive record of customers, application performance, >> security threats, fraudulent activity, and more. Splunk takes this >> data and makes sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-novd2d >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > Thomas Stein > Systems Engineer > _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |