Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control hash is not picking up the password. #701

Open
nitins12 opened this issue Jul 19, 2023 · 0 comments
Open

Control hash is not picking up the password. #701

nitins12 opened this issue Jul 19, 2023 · 0 comments

Comments

@nitins12
Copy link

nitins12 commented Jul 19, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant