Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Change a Database User's Privileges in DirectAdmin

A database user can have limited or full power. This guide shows how to change what a user may do in DirectAdmin.

Databases2 min read12 steps4 screenshots

What is a privilege?

A database is a store where your website keeps its data. A database user is a login that connects to it. A privilege is a permission. It says what that user is allowed to do. It is like a library card that may allow reading only, or reading and writing.

Common privileges are:

PrivilegeWhat it lets the user do
SELECTRead data
INSERTAdd new data
UPDATEChange data
DELETERemove data
CREATEMake new tables
DROPDelete whole tables
ALTERChange the shape of tables
INDEXMake lookups faster

Most apps, such as WordPress, need all of these to work and to update themselves.

Warning: Removing a privilege can break your site. Take a backup of the database first.

Steps

  1. Log in to DirectAdmin. Your login details are in your welcome email.
  2. In the Account Manager area, click MySQL Management.
    Screenshot: In the Account Manager area, click MySQL Management .
  3. Click the name of the database you want to change.
  4. You will see the list of users for this database. Find the user.
  5. Click Modify or the user name. The privilege options appear.
  6. Tick the privileges the user should have.
  7. Untick the ones it should not have.
  8. Click Save.
  9. Visit your website and test it.

Menu names can differ a little by DirectAdmin theme and version. If you cannot find the option, look for the database user's settings page.

Add an existing user to another database

Newer DirectAdmin versions let one user work with several databases. Open MySQL Management and look at the user list. Follow the on-screen option to add the user to another database. If your version does not show it, create a new user for that database.

Change the password

  1. Open the user in MySQL Management.
  2. Type a new password and click Save.
  3. Update the same password in your app's settings file, such as wp-config.php.
Tip: Give each app its own user. Give the least power it needs. A read-only user is safer for reports.

Quick recap

  • Privileges decide what a database user may do.
    Screenshot: Privileges decide what a database user may do.
    Screenshot: Privileges decide what a database user may do.
  • Open MySQL Management, pick the database, then the user.
  • Tick or untick privileges and click Save.
    Screenshot: Tick or untick privileges and click Save .
  • Most apps need full privileges to work.
  • Back up first and test your site after.