[chef] mysql cookbook database creation problem: cannot load such file -- mysql2


Chronological Thread 
  • From: Anthony Kong < >
  • To:
  • Subject: [chef] mysql cookbook database creation problem: cannot load such file -- mysql2
  • Date: Mon, 16 Feb 2015 07:30:59 +1100

Hi, 


It is my cookbook

mysql_service 'default' do
  bind_address '0.0.0.0'
  initial_root_password 'password'
  action [:create, :start]
end

# Create a mysql database
mysql_database 'zeetings' do
  connection(
    :host     => '127.0.0.1',
    :username => 'data',
    :password => 'password'
  )
  action :create
end

It is what I get when I run `kitchen converge`


           ================================================================================
           Error executing action `create` on resource 'mysql_database[test]'
           ================================================================================

           LoadError
           ---------
           cannot load such file -- mysql2

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/database/libraries/provider_database_mysql.rb:103:in `test_client'
           /tmp/kitchen/cache/cookbooks/database/libraries/provider_database_mysql.rb:37:in `block in <class:Mysql>'



Did I miss some steps here?





Archive powered by MHonArc 2.6.16.

§