最佳答案
您可能想要检查init_connect变量:
A string to be executed by the server for each client that connects.
The string consists of one or more sql statements,separated by
semicolon characters. For example,each client session begins by
default with autocommit mode enabled.
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_init_connect