Hoe voeg ik een extra gebruiker toe aan een MySQL-database in DirectAdmin?

Sometimes you need more than one user account for a database, for example to give an application limited access or to let a developer connect without your main credentials. DirectAdmin lets you create additional MySQL users and assign them to a database. This guide explains how.

Why add another database user #

  • Give an application its own dedicated credentials.
  • Grant a developer access without sharing your main user.
  • Limit permissions so each user has only what it needs.

Creating and assigning a user #

  1. Log in bij DirectAdmin.
  2. Ga naar Accountmanager > MySQL-beheer.
  3. Open the database you want to grant access to.
  4. Create a new user with a strong password, or select an existing one.
  5. Assign the user to the database and set the privileges it should have.
  6. Opslaan.

Rechten selecteren #

Grant only what is needed. A typical application user needs data privileges such as SELECT, INSERT, UPDATE, and DELETE, while administrative privileges should be limited. Keeping permissions minimal is good security practice.

Using the new credentials #

Note the database name, the new username, the password, and the host (usually localhost). Enter these into your application’s configuration so it connects with the new user.

Problemen oplossen #

  • Toegang geweigerd: Controleer of de gebruiker aan de database is toegewezen met de juiste rechten.
  • De app kan geen verbinding maken: re-check the name, user, password, and host.

Hulp nodig? #

If a database user will not connect, our support team can help over live chat.

Wat zijn je gevoelens