MySql chef coookBook (Access Denied Error)

Hi,

I am using mysql chef supermarket coookbook to set up "default" instance on CentOS 7. I am able to install the mysql and the chef recipe not able to create a root account with the provided password in recipe.

mysql_service 'default' do
port '3306'
version '5.6'
initial_root_password 'rundeck'
action [:create, :start]
end

I can access mysql without providing a password
"mysql -S /var/run/mysql-default/mysqld.sock -u root"

When I tried accesing with password, it resulted in "Access Denied Error"

mysql -S /var/run/mysql-default/mysqld.sock -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Looks like chef not respecting "initial_root_password".

I have updated metadata.rb file to use latest mysql chef cookbook (8.5.1). Two things which I have noticed

  1. I am unable to access the mysql without password. (this means the chef cookbook tried to set the password)
    2)I am unable to use the password which I have provided in recipe.

[root@rundeck-test cookbooks]# mysql -S /var/run/mysql-default/mysqld.sock -u root

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@rundeck-test cookbooks]# mysql -S /var/run/mysql-default/mysqld.sock -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

You can try this,

mysql -h '127.0.0.1' -u root -p

And feed the password 'rundesk' once it prompts