Knowledgebase : Technical Issues > Control Panel > MySQL
   

When a MySQL user is no longer deleted, you can remove them to prevent them from having access to any databases.

 Here are the steps:

  1. To access the MySQL Account Maintenance Menu, click on the words "MySQL Databases" on the main screen of your cPanel interface
  2. Scroll down to the user's name under "Users:"
  3. Click on "Delete" next to the user's name to remove their MySQL user


 

 

You can allow external web servers to access your MySQL databases by adding their domain name to the list of hosts that are able to access databases on your web site. localhost stands for the server that your site is currently on.

Here are the steps:

  1. To access, click the words "Remote MySQL" on the main screen of your cPanel interface
  2. Type the name of the server into the blank field next to "Host:" (It should be in the following format: test.cpdocs.net, server1.cpdocs.com, ns1.cpdocs.com, etc)
  3. Click on "Add Host" to allows that server to access your MySQL databases

Troubleshooting: To add a group of servers, you can use %.domain.com which would include all of the following: ns1.domain.com, server1.domain.com, test.domain.com, etc.

 

SQL stands for Structured Query Language. SQL is an international standard in querying and retrieving information from databases. MySQL is essentially an SQL server - it responds to requests for information that are written in SQL. To use a MySQL database, you must first create it, and then add one or more users to it.

Here are the steps:

  1. To access the MySQL Account Maintenance Menu, click on the words "MySQL Databases" on the main screen of your cPanel interface
  2. Enter the name of the new database in the blank field next to "Db:"
  3. Click on "Add Db" to create the database

Troubleshooting: You need to create at least one database user and grant that user permission to use the new database. Refer to Creating a MySQL user and Grant a user's permissions to a MySQL database for more information.

Since most accounts have MySQL database creation limits, it is recommended to remove any unnecessary MySQL databases so that you are able to create more databases when necessary.

Here are the steps:

  1. To access the MySQL Account Maintenance Menu, click on the words "MySQL Databases" on the main screen of your cPanel interface
  2. Click on "Delete" next to the name of the database you wish to delete

Troubleshooting: Before deleting a database due to problems with that database, try using repair on the database to repair any problems with it.


phpMyAdmin allows you to administrate all of your mySQL databases.

To learn more about this tool, please look at the phpMyAdmin help page within the software.

Once a MySQL user is created, they will need to be given permission to access any databases that they wish to access. To accomplish this, you must grant the user's permissions to a database.

Here are the steps:

  1. To access the MySQL Account Maintenance Menu, click on the words "MySQL Databases" on the main screen of your cPanel interface
  2. Select the user (the user will appear as mainuser_user) you wish to grant permissions for from the drop box next to "User:"
  3. Select the database (the database will appear as mainuser_database) you wish to give that user access to from the drop box next to "Db:"
  4. Select any privileges (abilities to modify the database) you wish the user to have by checking the box next to the privilege's name
  5. Click on "Add User to Db" to give the user permission to access the database 

Troubleshooting: The user will only have permission to change things you have given them the privileges for. Make sure the user has privileges for everything they need to modify.

 

You need to create a MySQL user before that user is able to use the database. This does not automatically allow the user to use a database - you need to grant that user permission to the specific database first. Refer to "Grant a user's permissions to a MySQL database" for more information.

Here are the steps:

  1. To access the MySQL Account Maintenance Menu, click on the words "MySQL Databases" on the main screen of your cPanel interface
  2. Enter the name of the new user in the blank field next to "Username:"
  3. Enter the password for the new user in the blank field next to "Password:"
  4. Click on "Add User" to create the new user

Troubleshooting: Creating a user does not automatically allow the user to use a database - you need to grant that user permission to the specific database first. Refer to "Grant a user's permissions to a MySQL database" for more information.