Each database can have one or more users, and each user needs privileges on the database to use it.
Viewing users for a database
Open Account Manager then MySQL Management and select the database. Its users are listed with their privileges.
Adding a user
- In the database’s page, choose to create a new user or add an existing one.
- Enter the user name and password, or pick an existing user.
- Choose privileges.
- Save.
Choosing privileges
| Use | Privileges |
|---|---|
| A normal application (WordPress, most apps) | All privileges on its own database |
| A reporting tool that only reads | SELECT only |
| A migration tool | All, then remove the user when finished |
Applications create and change tables during updates, so restricting a normal app’s privileges usually breaks updates.
Good practice
- One user per application. If one app is compromised, the attacker can’t read the others’ databases.
- Remove users you’ve finished with, such as temporary migration or developer accounts.
- Never reuse database passwords elsewhere.
Access denied errors
Access denied for user 'acme_shop'@'localhost' means the name, password or privileges are wrong. Check the full prefixed user name, reset the password, and confirm the user is listed on the database. Database connection failed
Looking for somewhere to run PHP and MySQL? Traxio’s free PHP MySQL hosting includes phpMyAdmin and is free for your first 30 days.