How do I create a MySQL database, a user and delete if need be?
A database will basically help you manage a large amount of information over the web.
To create a database: If you are using any type of PHP software or keeping a collection of records which need to be accessed in some way, you will need to create a database. below is how to create a MySQL database in cPanel.
Click ‘MySQL Databases’ icon
In the box to the right of the new database, please provide a name for the database.
Please note the cPanel will create the full name of the database as cPaneluser_databasename
Click ‘Create Database’ button
You now have successfully added the database. However, you will need to create access to the database by creating a user.
Here is how you create a user.
Create User: Whenever you have any type of MySQL database you will need to assign a user to be able to access the database.
If you would like to create a user and give them access to the database, please do the following
Click ‘MySQL databases’
Scroll down until you see the Current users section
Under this section and to the right of username, please provide a username for a database
Please note that that full database user will be cPaneluser_databaseuser
To the right of Password, please type the password for which you would like to create for this database user.
Click ‘Create User’
You have now created a database user. You can manage it from PhpMyAdmin, found in the databases section in cPanel.
You now need to give the user privileges for your specified database.
ln the drop-down menu to the right of User, please select the user for which you would like to give privileges to
To the right of Database, please select a database for which you would like the user to have privileges to.
Under privileges please choose what type of privileges you would like the user to have.
click ‘add user’ to database button. you have now created a database with a privileged user. You can now input the information to a PHP script or another script to access it locally.
Delete: if you are deleting a script or would like to restart a new database, the ﬁrst step is to delete the old MySQL database.
To do so, please do the following:
Click ‘MySQL databases’
Under current databases, you will ﬁnd the names of all your current databases
Click ‘delete’ next to the name of the database you would like to delete
You have now deleted a MySQL database.
Note: You may also need to delete the user who is accessing the database as well if you would like not to have any further traces of that database.