SmartVPS - the complete multi-account hosting solution! Each individual account comes with free backups, addon domains, PHP-FPM with OPcache and server-side caching for lightning-fast sites. And all this at a great price!

Associating a MySQL user with a database

To associate a MySQL user with a database, you need to grant some privileges for that MySQL user to the database by following these steps:

Note: The MySQL 5 and MySQL 8 servers are separate and do not share databases or users, so you can grant privileges to MySQL 5 databases only to MySQL 5 users and privileges to MySQL 8 databases only to MySQL 8 users. If you have two users for MySQL 5 and MySQL 8 with the same name, and modify the privileges for one of these users, the privileges for the other user will not be changed.

  1. Log in to your hosting Control Panel.
  2. Enter the MySQL Databases section.
  3. Navigate to the Privileges tab.
  4. Select the MySQL version of your database from the MySQL version drop-down menu.
  5. Select your database from the Database name drop-down menu.
  6. Select the MySQL user from the MySQL user drop-down menu.
  7. From the Privileges list, select the privileges that you wish to grant the MySQL user to the database.
  8. Click on the Associate button.

By default, your master MySQL user has full privileges over your databases. Due to security concerns, we recommend that you create and use a separate MySQL user for each software application installed on your account.