Creating databases and using phpMyAdmin

Almost every site that isn't just static pages needs a database. In cPanel you create one in about a minute — and there are three separate things, which is where most confusion starts.

The three things you need

1 The database — where the data lives.
2 The user — the account that connects to it. It is not the same as your cPanel user.
3 The permission — linking the user to the database. Without this step, the application connects and gets "access denied".

Creating them

1 In cPanel, open MySQL Databases.
2 Under Create New Database, type a name and create it. cPanel prefixes it with your account name automatically — that full name is what the application needs.
3 Further down, in MySQL Users, create a user with a strong password. Save that password now; it won't be shown again.
4 In Add User To Database, pick the user and the database, and grant ALL PRIVILEGES.

Using phpMyAdmin

phpMyAdmin, also in cPanel, is where you look at and edit the data directly — useful for changing a setting, fixing a table or exporting a copy.

1 To export, choose the database, open Export and confirm — the .sql file downloads.
2 To import, use Import and pick the file. Large files may fail here; if so, send us the file and we import it from the server side.
Take a backup before editing anything in phpMyAdmin. There is no undo. A wrong query in the wrong table takes the site down instantly — and the fastest recovery is yesterday's backup.

"Error establishing a database connection"? Send us the site's address.

Open a support ticket

SEE ALSO

How to change your PHP version

FTP accounts and connecting with FileZilla

How to install WordPress in a few clicks

Need hosting? See the plans.

WEB HOSTING

Looking for hosting that stays out of your way?

cPanel, a free SSL certificate, backups every night before dawn kept for a year, and support that answers in your language.

See hosting plans

Free migration of your current site · no lock-in

  • 0 Users Found This Useful
Was this answer helpful?