Share icon

Are you want to log queries in some files to see later what your system performance, in this session you can make it possible is just few commands.

we are using shell to execute this process because it is recommeded and most easiest one with restarting mysql server

so First login into mysql using shell, below command helps you, login using super access user

mysql -u username -p 

Now a shell prompted for password, Enter your password 

Now you can login into mysql, execute below commands to activate the query log for all queries

set global general_log_file = "/var/log/mysql/all_queries.log";
set global general_log = "ON";

it will create you file all_queries.log in specified folder, you can use your own path also

any database activity will save here untill you off general_log, we aware if you have enough space on system

You can of this use simple command like

set global general_log = "OFF";

hope this will helps you.

please comments if you have issue and update on this article



Profile picture for user Ronak Kumawat
darrellbohn04517913 (not verified)
21 May 2022
Hi, i think that i noticed you visited my web site thus i came to go back the prefer?.I'm trying to in finding issues to enhance my website!I suppose its ok to use a few of your ideas!!
Profile picture for user Ronak Kumawat
marquismassina1 (not verified)
21 May 2022
Excellent beat ! I wish to apprentice whilst you amend your site, how could i subscribe for a weblog site? The account helped me a applicable deal. I have been a little bit acquainted of this your broadcast offered shiny transparent concept
Profile picture for user Ronak Kumawat
ashleighprevost9446 (not verified)
21 May 2022
Hey there! I've been reading your blog for some time now and finally got the courage to go ahead and give you a shout out from Porter Texas! Just wanted to say keep up the great work!
Profile picture for user Ronak Kumawat
otilialachance46 (not verified)
21 May 2022
What's up all, here every person is sharing such knowledge, therefore it's nice to read this webpage, and I used to pay a quick visit this weblog every day.

Add new comment

Restricted HTML