How to change a MySQL or PostgreSQL database user password
Database passwords cannot be shown again after they are created. If you lost one, set a new one — then put the same password in your website's configuration.
Steps
- Log in to the control panel (
https://<server>:2083). - Open MySQL Databases (or PostgreSQL Databases) in the menu (section Databases).
- Under Database users, click Password next to the user.
- Enter the New password, at least 8 characters with three of: lowercase letters, uppercase letters, digits, symbols.
- Click Change.
You see Password changed. The new password works within a few seconds.
Update your website
The website still uses the old password until you change it in its configuration file. Open the file in the File Manager and replace the password:
| Application | File | Setting |
|---|---|---|
| WordPress | wp-config.php | define( 'DB_PASSWORD', '…' ); |
| Laravel | .env | DB_PASSWORD=… |
| Joomla | configuration.php | public $password = '…'; |
| PrestaShop | app/config/parameters.php | 'database_password' => '…' |
Good to know
- The user keeps its access to all its databases; you do not need to add it again.
- If you allowed addresses in Remote MySQL, the new password applies there too.
- Changing your control panel password does not change database passwords, and the reverse.
- WordPress sites installed from the panel have their own database user. Its password is only in
wp-config.php.
Common questions
My site shows "Error establishing a database connection" after the change. Why?
The configuration file still has the old password, or a typo. Check it, including quotes around the password. See database connection errors.
Can I see the current password?
No. Passwords are stored in a form that cannot be read back. Look in your site's configuration file, or set a new one.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- MySQL connection details: host, port, socket and examples
The database host (localhost), port 3306, socket path, name and user format to connect WordPress, PHP, Laravel, Node.js or Python to MySQL, with examples.
- Error establishing a database connection or access denied
Fix "Error establishing a database connection" and MySQL "Access denied for user" errors: wrong name prefix, password, privileges, host or remote access.
- How to create a MySQL database and database user
Create a MySQL (MariaDB) database and a database user in the control panel, add the user to the database, and get the details your website needs.