Knowledgebase

MySQL Databases — Create, Import, Export and Remote Access Print

  • 0

Creating a Database the Easy Way

Every dynamic website needs a database. In cPanel, the MySQL Database Wizard does the whole job in one pass:

  1. Open MySQL Database Wizard from the Databases section of cPanel.
  2. Enter a database name and click Next Step.
  3. Create a database user with a strong generated password. Save the password in a password manager immediately.
  4. On the privileges screen, tick All Privileges and finish.

Note that cPanel prefixes names with your account username, so a database called shop becomes something like acct_shop. Use the full prefixed name in your application configuration.

Importing a Database

  1. Open phpMyAdmin from cPanel and select your database in the left column.
  2. Click the Import tab, choose your .sql file, and click Go.
  3. For files larger than the upload limit, compress the file as .sql.gz, or split it, or open a support ticket and we will import it from the server side for you.

Exporting for Backup or Migration

In phpMyAdmin, select the database, click Export, keep the Quick method and SQL format, and click Go. Download completes in the browser. Take an export before every major website change; a one minute export has saved many businesses from a bad plugin update.

Remote MySQL Access

By default, databases accept connections only from the hosting server itself, which is the safest arrangement. If an external tool, a reporting system, or a developer machine must connect directly:

  1. Open Remote MySQL in cPanel.
  2. Add the public IP address of the machine that will connect.
  3. Connect using your cPanel server hostname, the prefixed database user, and port 3306.

Never add the wildcard percent sign as a host except for short testing, because it opens the database to the whole internet. Remove unused access IPs quarterly. For help with any of these steps, raise a ticket from app.techguru.co.in.


Was this answer helpful?
Back