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