[chef] Re: Re: Unable to connect to the mysql database server


Chronological Thread 
  • From: Anthony Kong < >
  • To:
  • Subject: [chef] Re: Re: Unable to connect to the mysql database server
  • Date: Mon, 16 Feb 2015 07:24:18 +1100

Previously I have used the other cookbook 'mysqld' in another vagrantfile:

  config.vm.provision "chef_zero" do |chef|
    chef.add_recipe 'mysqld'
    chef.json = {
      :mysqld   => {
        :root_password => "password"
      }
    }
  end

and it just installed the client and server without any issue. 

The official mysql cookbook apparently does not work out of the box :-(



On Mon, Feb 16, 2015 at 3:11 AM, Julian C. Dunn < " target="_blank"> > wrote:
On Sun, 15 Feb 2015, Anthony Kong wrote:

But I am unable to login:

mysql -u mysql -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock'

Seems like your mysql binary assumes the socket is in this location whereas your recipe set up my.cnf to have the socket in /run/mysql-default/mysqld.sock .

- Julian




Archive powered by MHonArc 2.6.16.

§