Sandeep rathore
asked on
Chef MySQL cook
Hi Experts
I have installed Mysql 5.7 package via chef.
Now when in try to create Database iam getting error,
Iam using the below to Create Database on Mysql:
mysql_database 'test' do
connection mysql_server_connection
action :create
end
mysql_database gives me error like method is undefined.
First i need to install the mysql2 gem
if i try to install mysql2_chef_gem i get error Package: No candidate version available for mysql-community-client, mysql-community-devel
I was unable to install mysql2_chef_gem which i have seen on the marketplace cookbooks but it does not work for me .
Any help or pointers will be very helpful for me.thanks
I have installed Mysql 5.7 package via chef.
Now when in try to create Database iam getting error,
Iam using the below to Create Database on Mysql:
mysql_database 'test' do
connection mysql_server_connection
action :create
end
mysql_database gives me error like method is undefined.
First i need to install the mysql2 gem
if i try to install mysql2_chef_gem i get error Package: No candidate version available for mysql-community-client, mysql-community-devel
I was unable to install mysql2_chef_gem which i have seen on the marketplace cookbooks but it does not work for me .
Any help or pointers will be very helpful for me.thanks
ASKER
Thanks for your advise on this question:
I will try to install Ruby gem and test.
I tried to run the
command mysql -h -u -p -e \'CREATE DATABASE test\'" this command line command works from the chef.
I will try to install Ruby gem and test.
I tried to run the
command mysql -h -u -p -e \'CREATE DATABASE test\'" this command line command works from the chef.
Awesome!
Glad you got this working!
Glad you got this working!
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
If this works, then just drop the database. At this point you'll know if your database subsystem is installed + working correctly.
This looks odd...
Open in new window
There's no admin user/pass credential which has privilege to create a database.
I don't use Chef so maybe this credential lives somewhere in a Chef config file.
Just make sure an admin credential lives somewhere, else all database creates will fail.
Note: When I visit https://supermarket.chef.i
This does not inspire confidence using Chef + MySQL.
I suggest you just install the Ruby gem + verify you can get this working in Ruby, before working with Chef.