Skip to content

Control hash is not picking up the password. #701

@nitins12

Description

@nitins12

I am trying to use a control hash for user root to grant privileges to another user but I am getting the password as null.

[2023-07-19T02:09:05-07:00] DEBUG: Control Hash: [{"user":"root","password":null,"socket":"/var/run/mysql/mysqld.sock"}]

[2023-07-19T02:09:05-07:00] DEBUG: Executing this command: [/usr/bin/mysql -B -e "SELECT User,Host FROM mysql.user WHERE User='profile_api' AND Host='192.168.114.188';" --user=root]

Earlier, we were using database cookbook and argument connection to LWRP as root. Can someone help me here what can we possible wrong.

Below is the provider block I am trying to use.

mysql_user new_resource.username do
#connection mysql_con_info
password node['mysql']['server_root_password']
database_name new_resource.database
privileges new_resource.privileges
host local_ip
require_ssl new_resource.connect_over_ssl
action [:create, :grant]
end

Other service would call this block and will try to create and grant the permission to user. I guess if I can figure out why password is null here it would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions