Re: How to prevent overriding of configs in my.cnf by variables?
Posted by: Ilya Khanataev
Date: June 07, 2016 11:56AM

Thank you for your answer! What you say, makes sense, but I actually don't have any idea, what might set the MySQL global/session variables. I started monitoring the log file defined in the variable:

$ tail -f /var/lib/mysql/ubuntuvm.log

and turned the logging via variable on:

mysql> SET GLOBAL general_log = 'ON';

Log output:

/usr/sbin/mysqld, Version: 5.6.30-0ubuntu0.14.04.1 ((Ubuntu)). started with:
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument

mysql> SHOW VARIABLES LIKE '%general%';

Log output:

160607 19:47:24 39 Query SHOW VARIABLES LIKE '%general%'

$ /etc/init.d/mysql restart

Log output:

160607 19:47:42 40 Connect debian-sys-maint@localhost on
40 Quit
41 Connect debian-sys-maint@localhost on
41 Query SHOW VARIABLES LIKE 'pid_file'
41 Shutdown

And no further log messages until I set the variable general_log to "ON" again.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.