Changing MySQL user
This commit is contained in:
parent
b70a93f595
commit
388d25652f
1 changed files with 6 additions and 1 deletions
|
@ -147,7 +147,7 @@ package 'mariadb-client'
|
|||
|
||||
|
||||
service 'mysql' do
|
||||
action [:enable, :start]
|
||||
action [:enable]
|
||||
end
|
||||
|
||||
template '/etc/init.d/mysql' do
|
||||
|
@ -158,6 +158,11 @@ template '/etc/mysql/mariadb.conf.d/50-server.cnf' do
|
|||
source 'mysql-50-server.cnf'
|
||||
end
|
||||
|
||||
execute 'mysql_change_user' do
|
||||
user 'root'
|
||||
command: '/bin/sed -i 's/^\(user\s*=\s*\).*$/\1vagrant/' /etc/mysql/my.cnf'
|
||||
end
|
||||
|
||||
directory '/var/run/mysqld' do
|
||||
user 'root'
|
||||
action :create
|
||||
|
|
Reference in a new issue