Setting up a database with CPanel control panel on your server is very easy. There are only a few steps. I use rockithost.com as my host company they have very good hosting packages. For my tutorials I use their $1.99 a month hosting with a CPanel control panel and get a free rockithost.com sudomain so I dont have to buy a domain name. Well enough about them .
Log into your cpanel account. Usually you would just go to your https://yourdomainname.com/cpanel and enter your username and password.
Find the icon that says MySQL Database Wizard. It will look just like this if you have rockithost.com as your host or it may be very similar on another host but it should say MySQL Database Wizard. Just click it .
The database name may have a prefix that you cant change so just type the name that you want for your database behind it in the box then hit the Next Step button.
The database username may also have a prefix just like the database name , just enter the name of the user in the box then enter the password for the user , confirm the password then hit the Create User button.
On this page you set the permissions of what the user can do with the database. I just hit the ALL PRIVILEGES check box . If you don’t need all the privileges you can select which ones you need and don’t need instead. Then click the Next Step button.
You should get a message that says User “YOUR_USERNAME” was added to the database “YOUR_DATABASENAME”.
That’s all you just created a database and a database user. To make use of your newly created database you will need some database tables. Learn how to make a simple database table with PhpMyAdmin.
Now if you want to see Set Up My Database Connection with PHP PDO