tags:

views:

114

answers:

2

Hi, is there a way we can view the incoming query requests to mysql server. I have a scenario where my asp.net application refuses to execute a query, but the same query executes inside of a mysql query browser. I have installed the mysql dotnet connector (5.0.9) via which I can conncet to the database.

I have referred this page, but I guess this will only work within the mysql session. The mysql server is hosted on a centos machine.

+3  A: 

Sounds like you want the mysql query log

Edit: Try this:

  1. Edit my.cnf in /etc/mysql/my.cnf
  2. /etc/init.d/mysql restart
  3. Look in /var/log/mysql
Tom Ritter
I tried doing /etc/init.d/mysqld restart --logI was expecting it should give a log but it didn't; I don't know if I am looking in the right place. In /etc/my.cnf file the data directory is reported as /var/lib/mysql. But I can't find the log file there either.
deostroll
A: 

Followed the steps mentioned by Tom Ritter. To be more specific...

While editing /etc/m.cnf (this is where ur mysql config info sits) find a section that says mysqld. Just below that type the following:

log=/var/log/mysql/generalquerylog.log

Do a the rest as mentioned in Tom Ritter's post.

deostroll