How are MySQL databases created?
As this is a cPanel web hosting platform, databases can only be created through the cPanel interface – they cannot be created through command line nor phpMyAdmin. The easiest way to create a new MySQL database and user is to utilise the MySQL Database Wizard.
If you are using a common CMS, please check Installatron/Softaculous for presence of that script in there before attempting manual installation. Managing your scripts and their databases is significantly easier through Installatron/Softaculous.
Using the MySQL Database Wizard
The wizard will run you through creating both a database and user, linking both and setting permissions:
- Login to cPanel.
- Click the MySQL Database Wizard icon.
- On Step 1 enter the desired name for your database, then click Next Step.
- On Step 2 enter the desired username and password to link to the database, then click Create User.
- On Step 3 select the desired privileges for the user on the database, this determines how the database may be managed, then click Next Step.
- The process has now been completed.
You can then use the MySQL database and linked user within your favourite script platform (such as WordPress or Joomla) to install it.
Using MySQL Databases
Using the MySQL Databases section is a little less straight forward, but it provides more freedom by allowing you to link additional users to a database (allowing multiple). The steps below are to manually create a new database, a new database user, then finally to link the database and user.
- Login to cPanel.
- Click the MySQL Databases icon.
- Under “Create New Database” you may enter your new database name, then click Create Database.
- Your new database will then be created and the screen will confirm it’s success, click “<- Go Back”.
- Under “MySQL Users” > “Add New User” enter your new database username and password, then click Create User.
- Your new database user will then be created and the screen will confirm it’s success, click “<- Go Back”.
- To then link your new database and user go to “Add User To Database”, select your new user and your new database, then click Add.
- Select the desired privileges for the user on the database, this determines how the database may be managed, then click Make Changes.
- Your database and user will now be linked and the screen will confirm it’s success, click “<- Go Back”.
On this same screen you can at any time add additional users to a database, add/Remove databases and users, click on users under “Current Databases” to edit permissions and click on users under “Current Users” to adjust their passwords.