Currently, the MySQL container is not writing any query logs at all. Erroneous query logs are written to stderr.
# Last lines of the mysql error log
icyflame@metakgp-blr:~$ docker exec -it metakgp-wiki_mysql_1 tail /var/log/mysql/error.log
2018-02-26T23:11:59.997694Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180226 23:11:59
2018-02-26T23:12:01.707688Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2551387
2018-02-26T23:12:01.709698Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-02-26T23:12:01.709711Z 0 [Note] Shutting down plugin 'MEMORY'
2018-02-26T23:12:01.709716Z 0 [Note] Shutting down plugin 'CSV'
2018-02-26T23:12:01.709720Z 0 [Note] Shutting down plugin 'sha256_password'
2018-02-26T23:12:01.709723Z 0 [Note] Shutting down plugin 'mysql_native_password'
2018-02-26T23:12:01.709892Z 0 [Note] Shutting down plugin 'binlog'
2018-02-26T23:12:01.711473Z 0 [Note] mysqld: Shutdown complete
These are the last few lines in the Error log and they were written back in February 2018. I checked the Global variables that enable logging, and they are not set properly.
mysql> SELECT @@global.general_log;
+----------------------+
| @@global.general_log |
+----------------------+
| 0 |
+----------------------+
1 row in set (0.00 sec)mysql> SELECT @@global.general_log_file;
+---------------------------------+
| @@global.general_log_file |
+---------------------------------+
| /var/lib/mysql/4efb1f830bf6.log |
+---------------------------------+
1 row in set (0.00 sec)mysql> SELECT @@global.log_output;
+---------------------+
| @@global.log_output |
+---------------------+
| FILE |
+---------------------+
1 row in set (0.00 sec)
We have to set general_log = 1 in the MySQL configuration file. We are not currently using one in this repository. We have to start using it when we build the mysql Docker image.
The configuration file has to be written with some basic options and then inserted into the correct path. More documentation on this can be found on the webpage for the official mysql docker image under the Using a custom MySQL configuration file section.
Currently, the MySQL container is not writing any query logs at all. Erroneous query logs are written to
stderr
.These are the last few lines in the Error log and they were written back in February 2018. I checked the Global variables that enable logging, and they are not set properly.
We have to set
general_log = 1
in the MySQL configuration file. We are not currently using one in this repository. We have to start using it when we build the mysql Docker image.The configuration file has to be written with some basic options and then inserted into the correct path. More documentation on this can be found on the webpage for the official mysql docker image under the
Using a custom MySQL configuration file
section.