How do I create a MySQL database and user? Print

  • 0

Below is a guide to creating a MySQL Database. MySQL databases are used by many web applications including content management systems, blogs and e-commerce. A MySQL database also requires a MySQL user with correct privileges to access and edit the MySQL database. The easiest way to create the database, user and correct privileges is to use the MySQL Database Wizard in cPanel.

To create/add a MySQL database and user, first log in to your cPanel:

http://www.yourdomain.com.au/cpanel

Once logged in, towards the bottom of the page click on MySQL Database Wizard


On the MySQL Database Wizard page, the first step is to create the database. To do this we need to enter a Database Name. Enter a name which can give a brief description to the database, eg shop, clients etc. The database name will be prefixed with your account username. Once a name has been entered click Next Step.


The next step is to create the database user. Enter a Username and Password of your choosing. You will then need to confirm the password by entering it again. Once this is done click Create User.


The next step is to add the user you just created to the database you just created. This is done by giving Privileges to the user on the database. It is recommended to give the user all privileges to the database. Click on the checkbox next to All Privileges and then click Next Step.


The database and user have now been created and the user has had the correct privileges assigned to the database. The MySQL database is now ready to be used by your web application!


Was this answer helpful?

« Back