Database users and passwords
A database user controls which application can connect to a database.
Where users are managed
| Newer version | Open Account Manager → Databases → Manage Users. A newly created user has no database access until it is explicitly granted. |
|---|---|
| Older version | In MySQL Management, click the database name and use Create New User or Add Existing User. |
Add a user
- Select the database.
- Create a new user or assign an existing one.
- Use a random unique password.
- Grant access only to databases required by the application.
Change a password with minimal downtime
- Prepare a new strong password.
- Change it in DirectAdmin.
- Immediately update the application's configuration file or environment variables.
- Test the website, administration and scheduled jobs.
The application reports a connection error until the passwords match. Separate email and DirectAdmin passwords are not changed.
Do not use the main account in an application
Use a dedicated database user for WordPress, PrestaShop or a custom application. It is easier to rotate, restrict and remove.