Re: [Sqlrelay-discussion] connect to sqlrelay (via mysql)
Brought to you by:
mused
From: David M. <dav...@fi...> - 2011-12-02 18:31:10
|
Hi Thomas, 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 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 |