How to Create a MySQL Database

All hosting accounts allow you to use and create one or more MySQL databases. You can create these databases in your cPanel, and manage them with the phpMyAdmin administrative interface.

Creating a database

  1. Connect to your cPanel.
  2. In the Databases category, click on MySQL Database Wizard.
  3. Enter any database name (example: project01) and click on Next Step.
  4. Enter a preferred Username and a secure password (you may automatically generate one by clicking on Password Generator), confirm your password, and click on Next Step. Note that the username will be composed of your main account username, followed by an underscore and your custom database username (example: johndoe_mysqlusername).
  5. Check the box next to ALL PRIVILEGES to grant the new MySQL user all rights to the database and click on Next Step.
  6. Note the database name, database user's name, as well as their password, as it will likely be required in your scripts. Note that the database name will be composed of your main account username, followed by an underscore and your custom database name (example: johndoe_dbname).
And you're done! You can now manage your database with phpMyAdmin (also available in cPanel), a tool that allows you to add and modify tables and their data. Consult the phpMyAdmin website for documentation about the application, and the official MySQL documentation.

 

Article ID: #HC5017

Was this answer helpful?