Skip to content

initial_root_password does not apply password during initialization of serviceΒ #715

@lordkage

Description

@lordkage

πŸ‘» 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: HighCritical work that must be completed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions