From b2ab1807e9d4af797dd994b4f90373be318bb760 Mon Sep 17 00:00:00 2001 From: Bogdana Vereha Date: Sun, 20 Aug 2017 20:54:04 +0200 Subject: [PATCH 1/2] Turn off performance schema for mysql --- .../travis_build_environment/recipes/mysql.rb | 19 +++++++++++++------ .../default/root/performance-schema.cnf.erb | 2 ++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb diff --git a/cookbooks/travis_build_environment/recipes/mysql.rb b/cookbooks/travis_build_environment/recipes/mysql.rb index 87a7157b5..14e8d0309 100644 --- a/cookbooks/travis_build_environment/recipes/mysql.rb +++ b/cookbooks/travis_build_environment/recipes/mysql.rb @@ -67,12 +67,11 @@ EOF end -service 'mysql' do - action %i[enable start] -end - -bash 'setup mysql users and passwords' do - code "mysql -u root <#{mysql_users_passwords_sql}" +template "/etc/mysql/conf.d/performance-schema.cnf" do + source 'root/performance-schema.cnf.erb' + owner 'root' + group 'root' + mode 0o640 end template "#{node['travis_build_environment']['home']}/.my.cnf" do @@ -83,6 +82,14 @@ variables(socket: node['travis_build_environment']['mysql']['socket']) end +service 'mysql' do + action %i[enable start] +end + +bash 'setup mysql users and passwords' do + code "mysql -u root <#{mysql_users_passwords_sql}" +end + include_recipe 'travis_build_environment::bash_profile_d' file ::File.join( diff --git a/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb b/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb new file mode 100644 index 000000000..450b07114 --- /dev/null +++ b/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb @@ -0,0 +1,2 @@ +[mysqld] +performance_schema=OFF \ No newline at end of file From d22c6026ef48f0b4749f104fc4dcb71c7c39f9d9 Mon Sep 17 00:00:00 2001 From: Bogdana Vereha Date: Sun, 20 Aug 2017 20:59:52 +0200 Subject: [PATCH 2/2] Add newline at end of file --- .../templates/default/root/performance-schema.cnf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb b/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb index 450b07114..e482be29d 100644 --- a/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb +++ b/cookbooks/travis_build_environment/templates/default/root/performance-schema.cnf.erb @@ -1,2 +1,2 @@ [mysqld] -performance_schema=OFF \ No newline at end of file +performance_schema=OFF