1

I've got a question to this discussion: Log all queries in mysql

Under answer ten is written: mysqld --log=log_file_name

  1. Can I give the name "mysql_result.txt" for the logfile?
  2. Where is the location of mysql_result.txt?

The folder of MySQL is /etc/mysql under ubuntu 20.04

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Please note: the MySQL folder is /var/lib/mysql under Ubuntu. /etc/mysql contains only configuration files. – Gheesh Sep 29 '20 at 23:18

2 Answers2

0

IF you give absolute path, you wont have any issue about where it is going to be saved. If you use relative path, It is saved under the data directory of the mysql server instance

Derviş Kayımbaşıoğlu
  • 28,492
  • 4
  • 50
  • 72
0

is the following sql-statemant correct, if i will safe the file on my desktop in ubuntu:

mysqld --log=/home/mike/Schreibtisch/mysql_result.txt

Thanks a lot

MB

  • Only if the directory is writable by the mysql user. I would suggest creating a directory under /tmp, home directories tend to protect user data from other users. – Gheesh Sep 29 '20 at 23:16