MySQL standalone users can provide additional security in certain advanced applications using databases. By restricting the permissions of a user to operate on a particular database, you can ensure that the database is protected from accidental or malicious actions.
Standalone users are not required for normal database use. When you create a new MySQL database, a user with full permissions is created with it.
To create a standalone user:
- Log into your eXtend Control Panel
- Click ‘MySQL Databases’
- Under ‘Create a Stand-alone MySQL User’, enter in the user name and generate a password
- Click ‘Create’
- The user is now created
By default, a standalone user has no permissions for the database. You must grant each permission specifically for the user.
If you have created the database and the standalone user, you can grant permissions for the standalone user by:
- Log into the database as the original user
- Run this SQL command:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `webXX-dbname`.* TO 'n-webXX-user'@'%' WITH GRANT OPTION;
(Please note if your database has an underscore in it, such as webXX-db_name, you will need to add a back slash just before the underscore. For example: webXX-db\_name.)
- Replace webXX-dbname with the name of the database, n-webXX-user with the standalone user’s name, and delete the permissions you do not want the standalone user to have
- The standalone user will now have the permissions they need
You can also adjust the permissions of your standalone user by using PHPMyAdmin.
To access your standalone user:
- Log into your eXtend Control Panel
- Click ‘MySQL Databases’
- Under ‘Manage MySQL Databases’, click ‘Manage’ on the row for the standalone user
- Modify your user in PHPMyAdmin
If there are any other privileges you need to grant on a database, but you do not have access to those permissions, please raise a Support Ticket with our Customer Services team with the details.