This guide explains how to create and manage MySQL databases in cPanel, which are required for applications like WordPress, Joomla, and many other websites. If you're setting up a new website on your Irish hosting account (.ie or .com domain), this is an essential step.
What is a MySQL Database?
A MySQL database stores your website’s content, such as pages, posts, user data, and settings. Most modern websites require both:
- A database
- A database user with permissions
Step 1: Log into cPanel
- Go to your cPanel login URL (e.g.
https://yourdomain.ie/cpanel) - Enter your username and password
- Scroll down to the Databases section
- Click on MySQL® Databases
Step 2: Create a New Database
- Under Create New Database, enter a name
- Click Create Database
Note: Your database name will automatically be prefixed with your cPanel username (e.g. cpuser_mydb).
Step 3: Create a Database User
- Scroll down to MySQL Users
- Enter a username
- Enter a strong password (use the Password Generator if needed)
- Click Create User
Tip: Always store your database username and password securely.
Step 4: Assign User to Database
- Scroll to Add User to Database
- Select your user and database from the dropdowns
- Click Add
- Tick All Privileges
- Click Make Changes
This step is essential — without it, your website will not be able to connect to the database.
Step 5: Using Your Database
You will now need the following details to connect your website or application:
- Database Name: cpuser_mydb
- Database Username: cpuser_user
- Password: (your chosen password)
- Database Host: localhost
These details are typically entered during installation of applications like WordPress via Softaculous or manual setup.
Managing Your Database with phpMyAdmin
You can manage your database content using phpMyAdmin:
- Go back to cPanel
- Click phpMyAdmin under the Databases section
- Select your database from the left-hand menu
From here, you can:
- View and edit tables
- Import or export databases
- Run SQL queries
Importing a Database (e.g. Migrating a Website)
- Open phpMyAdmin
- Select your database
- Click the Import tab
- Choose your
.sqlfile - Click Go
This is commonly used when moving a website from another hosting provider.
Exporting a Database (Creating a Backup)
- Open phpMyAdmin
- Select your database
- Click the Export tab
- Choose Quick method
- Click Go
Common Issues & Troubleshooting
Error: "Error Establishing a Database Connection"
- Check database name, username, and password
- Ensure the user is assigned to the database
- Confirm database host is
localhost
Access Denied for User
- Reassign the user to the database
- Ensure All Privileges are selected
Website Migration Issues
- Ensure database is fully imported
- Update configuration files (e.g.
wp-config.php)
Need Help?
If you're unsure about any step or your website isn't connecting correctly, please contact our support team via your client area. We're happy to help.