Knowledge Base

Databases and phpMyAdmin

Most applications (WordPress included) store their content in a MySQL database. Starter includes 1 database, Pro 10, Premium unlimited.

Creating a database

  1. In cPanel, open MySQL Databases.
  2. Under Create New Database, enter a name and click Create Database. cPanel prefixes it with your account name, so blog becomes youruser_blog.
  3. Under MySQL Users, create a user with a strong password (use the generator).
  4. Under Add User To Database, pick the user and the database and grant All Privileges.

Your application's config needs the full database name (with the prefix), the full username (also prefixed), the password, and localhost as the host.

phpMyAdmin

phpMyAdmin in cPanel lets you browse, search, export and import databases in the browser. Two common uses:

  • Export a backup before a risky change: select the database, click Export, then Go.
  • Import a database from a previous host: create an empty database first, select it, click Import, choose the .sql file.

Imports over about 50 MB can time out in the browser. For those, open a ticket and we will import it for you, or use the command line on Premium.

Remote access

Databases are reachable from scripts on your account only. If an external tool needs to connect, add its IP under Remote MySQL in cPanel and use yourdomain.com as the host.

Please rate this article to help us improve our Knowledge Base.

0 0