When you need this
If you installed WordPress or another app through Softaculous, the database was created for you automatically. This guide is for when you're setting up a custom PHP app, a framework like Laravel, or anything else that needs its own database.
Create the database
- In cPanel, open MySQL Databases.
- Under Create New Database, type a name (cPanel prefixes it with your account name, so
myappbecomes something likeusername_myapp). - Click Create Database.
Create a database user
- On the same page, scroll to MySQL Users > Add New User.
- Choose a username and a strong password. Use the password generator if you like.
- Click Create User.
Connect user to database
- Scroll to Add User To Database.
- Select the user and the database you just created.
- Click Add.
- On the privileges screen, tick ALL PRIVILEGES and click Make Changes.
Use it in your app
Your app's config will ask for four things:
- Host:
localhost - Database: the full prefixed name, e.g.
username_myapp - Username: the full prefixed username
- Password: the password you set above
Browse your data
Open phpMyAdmin from cPanel to view tables, run queries, and import or export data.
Related guides
Install WordPress in one click
Start a brand-new WordPress site on your domain in about two minutes, no files or databases to set up.
Your siteBack up and restore your site
Download your own copy of your files, databases, and email, and know how to get them back.
Your siteUpload a website with File Manager or FTP
Put an HTML site, or one exported from a site builder, live on your domain.
Stuck on a step? Email support@dredgehost.com and we'll help you sort it out.
Did this guide help? A short review on Trustpilot helps other people find a small host they can trust.
