Create online MySQL Databases from cPanel

AsSalam and hi all.

This is another basic yet quite important knowledge for a new web system developer to master. Creating an online MySQL database from cPanel and then connect it to your system. In this tutorial, I will cover on creating the databases 1st, while on the next tutorial I will then cover how to connect and display data from your online databases. Alright, lets start.

  • Login to your hosting cPanle (usually url : https://yourdomain.com/cpanel )
  • From DATABASES section, select MySQL ® Database Wizard

  • Enter databased name, for example here is dewasolu_demodb , then click Next Step

 

  • Enter databased username and Password, for example here are:
    • Username : dewasolu_demo
    • Password : HKguJh576#6&&tR.
  • You also can use the Password Generator button option to generate a password.
  • Then click Create User

  • Step 3 check the box for ALL PRIVILEGES
  • Then click on Next Step

  • Your databased is created and read. Click on Return Home
**Remember the Username, Password and Databased that you just created**

  • At cPanel home page, select phpMyAdmin to access your new database.

  • There might be a list of databased. Select the one we just created.
  • Then, to create a table, enter Name and Number of columns and then click Go For example, here are;
    • Table name: dataSaya
    • Table Number of columms: 4

  • Set table as id (int , PRIMARY, A_I) , nama (varchar , 100), email (varchar, 100) and password (varchar, 50) , then click on Save

  • Now your table is ready.

  • As for example, we will enter data from phpMyAdmin.
  • Click on Insert

  • By default, there are 2 sets of data can be inserted (you can add more than 2), so just enter 2 data as the example below.
  • ID must be left empty as it is the primary key data and auto-increment. MySQL will generate it automatically.
  • Click the Go button to save your data.

  • Data successfully inserted. Click Browse link to view the data.

 

Next, we will write PHP code to connect to the database and display the data on a webpage.