It seems like this has been an issue in the past (
https://github.com/puppetlabs/puppetlabs-mysql/issues/228,
https://groups.google.com/forum/#!searchin/puppet-users/mysql/puppet-users/mkQygmpa610/bXIslE9EG4cJ), but I'm not sure its fixed yet. Can anyone show me some demonstration puppet code that will install MySQL and configure it to use /mnt/mysql instead of /var/lib/mysql? Nothing I seem to try works -- the MySQL daemon continues to start up and use /var/lib/mysql.
The simplest thing that should have worked, I think, is:
node foo {
file { '/mnt/mysql':
ensure => directory,
owner => 'mysql',
group => 'mysql',
notify => Class['mysql::server::service'];
}
class { '::mysql::server':
override_options => {
'mysqld' => { 'datadir' => '/mnt/mysql', },
},
require => File[$datadir];
}
mysql::db { 'foo': }
}
This did create the /mnt/mysql directory, but mysqld still started up using /var/lib/mysql... even though my.cnf clearly pointed to /mnt/mysql.
Ideas?