MySQL databases store dynamic website data, such as content, user accounts and settings.
Most CMS platforms require at least one database to function.
Databases are available on Web Hosting and Site Hosting packages.
What a MySQL Database Is #
A MySQL database:
- Stores structured website data
- Works together with PHP applications
- Is required for dynamic websites
Static websites do not require databases.
What You Need Before Creating a Database #
Before creating a database:
- You must have an active Web Hosting or Site Hosting subscription
- You must have access to cPanel
- You should know which application will use the database
Database limits depend on your package.
Creating a Database in cPanel #
To create a database:
- Log in to cPanel
- Go to the Databases section
- Click Manage My Databases
- Enter a name for the database
- Create the database
The database is created immediately.
Creating a Database User #
After creating a database, you must create a user:
- Create a new database user
- Set a strong password
- Save the user
Users control access to the database.
Assigning User Permissions #
To allow access:
- Assign the user to the database
- Select required privileges
- Confirm the assignment
Most applications require all privileges.
Database Name Format #
Database names:
- Are prefixed automatically
- Must be used exactly as shown
- Are case-sensitive in some environments
Always copy the full name.
Verifying Database Access #
After setup:
- Test the connection in your application
- Verify credentials carefully
- Confirm the correct host is used
Incorrect credentials cause connection errors.
Common Mistakes #
- Forgetting to assign a user to the database
- Using incorrect database names
- Using weak passwords
- Mixing up database users
Most database errors are configuration-related.
Security Best Practices #
- Use strong, unique passwords
- Create separate users per application
- Remove unused databases and users
Database security is critical.
Responsibility Notice #
You are responsible for:
- Creating and managing databases
- Securing database credentials
- Removing unused databases
ProRedLine does not manage application databases.
Still need help after reading this article?
