Create a user and database on Leprd

In order to use a database, you must create one first and assign a user authorized to view that database. The ‘user’ in this case will be you, but it is executed by your PHP code.

To begin, login to your leprd.space cPanel dashboard.

Under the Databases area, click on MySQL Databases

At the top of the page, you will see Create New Database. Enter your database’s name. Note how on Leprd, every table is prefixed by your username and an underscore. Like “username_webring”.

Click on the Create Database button to create it. On the following screen, click go back, to return to the MySQL Databases page.

If you have not created a database user yet…

Scroll to Add New User and create a username for your database user. Note how every username is prefixed by your username and an underscore. Like “sadness_db”. Be sure to choose a secure password. Make sure you keep track of this information, because you will need it when you set up your app.

Adding the user permissions to the database

Scroll to the area titled Add User to Database. Select your database user, and select the database you’d like to authorize. Then click on the blue Add button.

On the following page, select the permissions you’d like to give the user. If this is your first time playing with SQL, I recommend choosing ‘all’ for a while to get a feel for everything, but do some research about which ones you’ll actually need when your site goes live. Then click Make Changes

View your database

Now a user has been authorized to make changes to your database, and you will be able to view your database in the left sidebar of phpMyAdmin.

To open phpMyAdmin, return to the cPanel dashboard and click on phpMyAdmin which is under the databases section.



Hey, thanks for reading! If you have any questions, you can leave me a comment and I always try to reply.

If you have any suggestions on how I can improve this article, please let me know!

This website is not monetized in any way. It purely exists to help others on their web-building journey. However, if you have the means to donate toward my server costs, I have a ko-fi account where I accept tips.

Leave a Comment