How to create MySQL users & assign permissions Print

  • 0

Overview

You can create additional MySQL users and assign permissions to a database. This is useful for developers, staging environments, or separating app permissions.

Create a new MySQL user

  1. Open DirectAdmin
  2. Go to MySQL Management
  3. Select your database
  4. Click Modify Privileges
  5. Click Add New User
  6. Enter:
    • New username
    • Password
  7. Click Create

Assign permissions

You can enable or disable the following permissions:

  • SELECT — read data
  • INSERT — add data
  • UPDATE — edit data
  • DELETE — remove data
  • CREATE
  • DROP
  • ALTER

Choose the required permissions and click Save.

Tips

  • Use separate users for production and development.
  • Never grant full privileges to untrusted developers.
  • Rotate passwords regularly for security.

Was this answer helpful?

« Back