Well, somehow I had changed the “db_password” in site_config.json and now I am not able to bench update. Looks like I deleted some characters from the field. How can I create a new site_config.json (or rather create db_password) while keeping the current database intact.
Any suggestions, please.
Hi @kxt5258,
whenever frappe framework creates new site it will randomly assigns the password to database user,
So, I don’t think the old password can be recovered.
But you can update the Database user password and update the site_config.json manually.
To update the database password using
SET PASSWORD FOR 'db_name'@'localhost' = PASSWORD('any-string-as-password');
please refer mysql - Change DB User PWD or cyberciti - Change DB User PWD
Once you updated the password then update the site_config.json db_password
value with any-string-as-password
Please take the database backup first, Hope this will help.
Thanks,
Makarand
2 Likes