For security reasons, how do I change database password and user on ERPNext side?

I want to create a new user with a new password and give it permission over erpnext database, straightening the security that way…

I’m not quite clear on what you’re asking. At a systems level, there are three different kinds of user: (1) your ERPNext/Frappe instance users, (2) your operating system users, and (3) your database users. The database username and password ERPNext uses are both specified in the sites/SITE_NAME/site_config.json file. You could change them there, though of course you’d also have to make the changes on the Mariadb side as well.

Yeah, the number 3. I want to change database user, first in MariaDB and then in ERPNext.
Although password and user are encrypted in site_config.json, could I somehow encrypt new ones also?

Thanks for help.

I’m still not quite following why you want to change the mariadb user/password, but in any case the values listed in site_config.json aren’t encrypted. You can check for yourself by logging in directly using those credentials.

Well, I considered that the user was root and password was the weak link for security and wanted it renewed. But my bad, now I see that it is a strong random password and user.