Changing a database password immediately breaks any application still using the old one. Have the configuration file ready to update.
Steps
- Open Account Manager then MySQL Management.
- Select the database, then the user.
- Choose to change the password, enter a new one, and save.
- Straight away, update the password in the application’s configuration file:
| Application | File | Setting |
|---|---|---|
| WordPress | wp-config.php | DB_PASSWORD |
| Laravel | .env | DB_PASSWORD |
| Joomla | configuration.php | $password |
| Custom PHP | Your config file | Varies |
- Reload the site.
Special characters
Some characters need escaping in configuration files: a ' inside a PHP single-quoted string, or # and spaces in .env files (wrap the value in double quotes). Using letters, numbers and - or _ in a long password avoids the problem entirely.
When to change it
- After a developer or agency no longer needs access
- After a suspected compromise
- If the password has ever been shared in email or chat
Every Traxio account includes a MySQL database with phpMyAdmin. If you’re still choosing a host, PHP and MySQL hosting is free for 30 days, then £0.99 a month.