Archive for April, 2011

On investing in employees

Unfortunately I have not been able to find the author of the quote below. However it carries an interesting message about investing in people.

– What happens if we invest in developing our people and then they leave the company?
– What happens if we don’t, and they stay?

MySQL: How to hide queries in the general log

There could be some cases when the general query log has to be kept running. This includes development stage, different flavors of debugging and query analysis and so on. However certain queries do not need to be stored there even though the logging is on. One of the examples is setting user password – it will be logged in clear text.

A possible workaround is to turn off the general logging temporarily. MySQL 5.1 and higher allows to do it without the service restart.

CREATE USER john;
SET SESSION sql_log_off = 1;
SET PASSWORD FOR john = PASSWORD('smith');
SET SESSION sql_log_off = 0;

However SUPER privilege is required to set the session variable sql_log_off.