I'm running MySQL 5.5 on Ubuntu.
There is a my.cnf file in /etc/mysql/ where I would expect it to be. - Great!
For debian installations of mysql it is recommended that you do not edit the my.cnf file. There is an IncludeDir directive in the /etc/mysql/my.cnf file to look in the /etc/mysql/conf.d/ folder for more options files.
When I place this a file here:
MySQL reads the file and overrides anything in /etc/mysql/my.cnf.
Here's the problem:
I keep my local copy of the /etc/mysql/conf.d/my-local.cnf file in source control and want to update it periodically for the whole team. So, my solution is to symlink it:
cd /etc/mysql/conf.d/ ln -s /path/to/my/my-local.cnf my-local.cnf
MySQL does not read this symlink.
I have verified the following:
- Both the physical file and the symlink have the .cnf file extension as per mysql's manual.
- The mysql user has access to this file
- Every user has access to this file
- The mysql user has access to the symlink
- Every user has access to the symlink
So to summarise, MySQL will read and parse when there is a physical file in the /etc/mysql/conf.d/ folder. Mysql will not read a symlink in this folder.
Any ideas anyone? Could this be a debian/ubuntu issue?
A similar, but unresolved and slightly different problem was outlined here.