Creating a MySQL Database
In cPanel
- Go to MySQL Databases
- Enter database name > Create Database
- Enter username and password > Create User
- Add user to database > Select ALL PRIVILEGES > Make Changes
Connection Details
Use these in your application:
- Host: localhost
- Database: cpanelusername_dbname
- Username: cpanelusername_username
- Password: the password you set
phpMyAdmin
To manage your database (view tables, run queries):
- cPanel > phpMyAdmin
- Select your database from the left panel
- Browse, search, import, or export data
Import Database
- phpMyAdmin > Select database
- Click Import tab
- Choose .sql file
- Click Go
Tips
- Always backup before making changes
- Database names are prefixed with your cPanel username
- Maximum database size depends on your hosting plan