Skip to content

Set MYSQL root password not working #1

@nizzam

Description

@nizzam

I did change the root_password and after provisioning, I tried to sudo mysql -u root -p and enter the password returns an error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).

Ubuntu : 24.04
MySQL : Ver 8.0.39-0

config.yml

installs:
  ....
  database:
    mysql: yes
    mariadb: no
    root_password: 12345678

mysql.sh

# Set the root password
sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$installs_database_root_password';"

Appreciate your helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions