-
-
Notifications
You must be signed in to change notification settings - Fork 688
Open
Labels
Priority: HighCritical work that must be completedCritical work that must be completed
Description
π» 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
- Install and configure the MySQL service
mysql_service 'default' do
port '3306'
version '8.0'
initial_root_password mysqlpass['password']
action [:create, :start]
end
- Converge
- Attempt to connect via Socket:
mysql -S /var/run/mysql/mysql.sock
- The resulting error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- Attempt to connect via Socket with expected Password:
sudo mysql -p -S /var/run/mysql/mysqld.sock
- The resulting error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- Attempt to connect with HARD CODED default password:
sudo mysql -p -S /var/run/mysql/mysqld.sock
- 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
- I spent a number of days tracking this down thinking I had a corrupt data bag or some other issue.
- Other issues like initial_root_password has no effect on modern MySQL versionsΒ #681 and Control hash is not picking up the password.Β #701 seem to be related to the same problem.
HP41 and Baroti
Metadata
Metadata
Assignees
Labels
Priority: HighCritical work that must be completedCritical work that must be completed