View all Products Close Menu Menu
How do I create a MySQL Database and User?
Posted Wednesday April 16th 2014 / Category MySQL

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:

  1. Login to your cPanel service.
  2. Click the MySQL Database Wizard icon.
  3. On Step 1 enter the desired name for your database, then click Next Step.
  4. On Step 2 enter the desired username and password to link to the database, then click Create User.
  5. 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.
  6. 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.

  1. Login to your cPanel service.
  2. Click the MySQL Databases icon.
  3. Under “Create New Database” you may enter your new database name, then click Create Database.
  4. Your new database will then be created and the screen will confirm it’s success, click “<- Go Back”.
  5. Under “MySQL Users” > “Add New User” enter your new database username and password, then click Create User.
  6. Your new database user will then be created and the screen will confirm it’s success, click “<- Go Back”.
  7. 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.
  8. Select the desired privileges for the user on the database, this determines how the database may be managed, then click Make Changes.
  9. 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.

Can’t find the answers you're looking for? Check out these other methods of support!