Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* username/password in attributes (most likely for later)

 * setup dev env with percona::dev
  • Loading branch information...
commit b8a4d7786816e00a9f56754480d1bad06feb7bef 1 parent bfa9e37
@till authored
View
8 percona/attributes/default.rb
@@ -1,6 +1,8 @@
-default[:percona] = {}
-default[:percona][:version] = "5.5"
-default[:percona][:key] = "1C4CBDCDCD2EFD2A"
+default[:percona] = {}
+default[:percona][:version] = "5.5"
+default[:percona][:key] = "1C4CBDCDCD2EFD2A"
+default[:percona][:user] = "root"
+default[:percona][:password] = ""
# set if scalarium is not available
set_unless[:mysql] = {}
View
2  percona/files/default/grant.sql
@@ -0,0 +1,2 @@
+GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
+FLUSH PRIVILEGES;
View
17 percona/recipes/dev.rb
@@ -0,0 +1,17 @@
+# Grant root access from *!
+# Obviously not a good idea in production.
+
+cookbook_file "/tmp/grant.sql" do
+ source "grant.sql"
+ mode "0600"
+end
+
+mysql_command = "mysql -u #{node[:percona][:user]}"
+if not node[:percona][:password].empty?
+ mysql_command += " -p#{node[:percona][:password]}"
+end
+mysql_command += " < /tmp/grant.sql"
+
+execute "open mysql to the world!!!111one" do
+ command mysql_command
+end
Please sign in to comment.
Something went wrong with that request. Please try again.