Creating a database user and granting access
A database on its own cannot be used until a user is attached to it. Here is the full process in the DirhamHost panel:
- Open MySQL Databases.
- Under Add New User, enter a username and a strong password, then click Create User.
- Scroll to Add User To Database, select your user and your database, then click Add.
- On the privileges screen, tick All Privileges and save.
For a normal website application you should grant All Privileges so it can create tables and read/write data. For a read-only reporting connection you might grant only SELECT.
Remember:
- The username is usually prefixed, e.g.
dad1234_wpuser- use the full name in your app config. - Use the database host
localhostfor scripts running on the same hosting. - Never reuse your control panel password for a database user.
If your application reports Access denied for user, it usually means the user was created but not added to the database, or the password does not match. Recheck step 3. Support is available 24/7 at support@dirhamaday.ae.
Still need a hand? Our UAE-based team is here 24/7.