Fixing MySQL first boot

This commit is contained in:
Axel 2017-11-20 14:55:01 +01:00
parent 0aa4bef236
commit 506ac453f6

View file

@ -146,6 +146,7 @@ template '/etc/mysql/mariadb.conf.d/50-server.cnf' do
end end
directory '/var/run/mysqld' do directory '/var/run/mysqld' do
user 'root'
action :create action :create
owner 'vagrant' owner 'vagrant'
group 'vagrant' group 'vagrant'
@ -158,7 +159,7 @@ service 'mysql' do
end end
execute 'mysql_create_databases' do execute 'mysql_create_databases' do
user 'root' user 'vagrant'
notifies :stop, 'service[mysql]', :before notifies :stop, 'service[mysql]', :before
command '/usr/bin/env mysql_install_db' command '/usr/bin/env mysql_install_db'
creates '/vagrant/mysql/data/mysql' creates '/vagrant/mysql/data/mysql'