Change root mariadb password

How change mariadb root password for frappe bench version15 on production mode

@soft
Try to change db_password in common_site_config.json

Navigate to your Frappe Bench directory:

  1. cd /path/to/frappe-bench
  2. nano sites/common_site_config.json
{
    "db_password": "newpassword"
}

Then restart the services

is this change will be over sites ?
i want to change the root password of mariadb

@soft
Yes it’s updates the database password used by the Frappe applications.

If you want to change the root password for MariaDB in a Frappe Bench setup then try this:
Access Mysql

  1. mysql -u root -p
  2. USE mysql;
    UPDATE user SET password=PASSWORD('newpassword') WHERE User='root';
    FLUSH PRIVILEGES;
    
  3. EXIT;
  4. sudo systemctl restart
2 Likes

thank you i try this way and worked fine and i share
mysql -u root -p
USE mysql;
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘newpassword’;
FLUSH PRIVILEGES;
EXIT;
sudo systemctl restart mysql
sudo supervisorctl start all
sudo systemctl start nginx