Best unofficial Apache Server developers community |
|
Good Afternoon All,
posted via StackOverflow
|
|
 
|
You have to activate the query logging in mysql. 1.edit /etc/my.cnf [mysqld] log=/tmp/mysql.log 2.restart the computer or the mysqld service service mysqld restart 3.open phpmyadmin/any application that uses mysql/mysql console and run a query 4.cat /tmp/mysql.log ( you should see the query ) |
|
 
|
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] log = /var/log/mysql/mysql.log binlog-do-db=zero user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp skip-external-locking bind-address = 127.0.0.1 # * Fine Tuning# key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 general_log_file = /var/log/mysql/mysql.log general_log = 1 Here you can see queries with especially long durationlog_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 2 log-queries-not-using-indexes log-bin = /var/log/mysql/mysql.log read_only = 1 binlog-format = STATEMENT slow-query-log general-log log-slow-slave-statements log-slow-admin-statements log-error = [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] no-auto-rehash # faster start of mysql but no tab completition[isamchk] key_buffer = 16M |
|
 
|
From the MySQL reference manual: "By default, all log files are created in the data directory." Check /var/lib/mysql |