From: Michael Dykman Date: June 9 2010 3:01pm Subject: Re: How can I see the query from a remote session against my server List-Archive: http://lists.mysql.com/mysql/221859 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable binlogs only contain data modifications, it won't show you the SELECT queries; I don't think that path is worth your time for the problem at hand. I suggest you explicitly enable the gebneral query log and restart if need be. - md On Wed, Jun 9, 2010 at 9:47 AM, Anirudh Sundar w= rote: > Michael is right. But sometimes General log is not enabled and if that is > the case then you need to refer to the "Binary" logs. > > But you cannot read the contents of the binlog just like that. You need t= o > convert that to a readable format. > > mysqlbinlog bin.10001 > /tmp/read_bincontent.log > > Cheers, > Anirudh Sundar > DataVail Corp > Mumbai > > > On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote: > >> You have 2 options here. =A0The Mysql General Query Log >> >> http://dev.mysql.com/doc/refman/5.1/en/query-log.html >> >> Alternatively, if it's windows ( I ask because of the ODBC connector) >> and it's easier for you, >> I haven't done windows in awhile, but I suspect you might find what >> you want via that connector. =A0I seem to recall that you can, via >> control panel, set debug options on the connector which will happily >> create enormous logs of every query passing through. >> >> best of luck. >> >> =A0- md >> >> =A0(side-note: I would not recommend hosting data services without a DBA >> to manage them) >> >> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote= : >> > Hi, >> > >> > I'm a real newb at admining MySQL. =A0 =A0We have a customer that uses= our >> software that scripts queries and they are using a MySQL backend. >> > >> > They have sent us a test script and their database and I have setup a >> test server, loaded the data setup an ODBC connection and this all works >> fine. >> > >> > The first job they sent us appears to be working fine, but the second = one >> throws an error saying the query is empty back at us. >> > >> > I am an IT manager and I don't know much about how our software script= ing >> system works or even if there is a debugger, so I was just trying to att= ack >> the problem from the server side to see if I could see the query at the >> server... =A0 I thought profiling might help, but that only helps me wit= h the >> session that I am connected to as far as I can see anyway, I'm not seein= g >> any of the queries that are being generated by the remote seesion throug= h >> the odbc connector... >> > >> > Is there some way the I can see the queries that are being run against >> this server from the remote session? =A0As this is a test system and it'= s >> doing very little, I was hoping that if I could see the query I might ge= t >> some insight of what might be wrong in the script without having to lear= n >> how our whole scripting software system works. >> > >> > I have done this with the MSSQL profiler in the past to locate slow >> queries in the past, so I assume it is possible and I just can't make th= e >> documents on the MySQL profiler make sense to me. >> > >> > Thanks for any help anyone could provide on this as I've got people th= at >> expect miracles in the next 5 minutes here! >> > >> > Bill >> > >> > >> >> >> >> -- >> =A0- michael dykman >> =A0- mdykman@stripped >> >> =A0May the Source be with you. >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: >> http://lists.mysql.com/mysql?unsub=3Dsundar.anirudh@stripped >> >> > --=20 - michael dykman - mdykman@stripped May the Source be with you.