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

initial_root_password does not apply password during initialization of service #715

Open
lordkage opened this issue Oct 3, 2024 · 0 comments

Comments

@lordkage
Copy link

lordkage commented Oct 3, 2024

πŸ‘» Brief Description

Using initial_root_password in the mysql_service resource does not apply the password, it always uses the default

πŸ₯ž Cookbook version

11.1.6

πŸ‘©β€πŸ³ Chef-Infra Version

18.5.0

🎩 Platform details

CentOS Streaming 8 (but this appears to be an issue in multiple OSes)

Steps To Reproduce

  1. Install and configure the MySQL service
mysql_service 'default' do
  port '3306'
  version '8.0'
  initial_root_password mysqlpass['password']
  action [:create, :start]
end
  1. Converge
  2. Attempt to connect via Socket: mysql -S /var/run/mysql/mysql.sock
  3. The resulting error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  1. Attempt to connect via Socket with expected Password: sudo mysql -p -S /var/run/mysql/mysqld.sock
  2. The resulting error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  1. Attempt to connect with HARD CODED default password: sudo mysql -p -S /var/run/mysql/mysqld.sock
  2. Success! (and totally disappointing)

πŸš“ Expected behavior

You should be able to connect with the expected/defined password from the recipe. The default resource password SHOULD NOT be used.

βž• Additional context

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