Get a free website with any plan

See how
HOSTING

Creating MySQL databases

Last updated

IN SHORT

Creating a MySQL database on Flashcloud takes three steps in the portal: create the database under Services, create a user, then grant that user privileges on the database. The database is ready immediately, but starts empty with no users until you complete all three steps.

Most apps you'd run on hosting (WordPress, Joomla, Drupal, custom PHP) need a database. Creating one takes a minute.

Create a database

  1. Go to Services → click your hosting → Databases tile.
  2. Click Create database.
  3. Enter a name. Most hosts prefix it with your account username automatically (e.g., youraccount_wordpress).
  4. Click Create.

The database is ready immediately, but it's empty and has no users yet.

Create a database user

  1. On the same Databases tile, click Create user.
  2. Enter a username (also typically prefixed automatically).
  3. Set a strong password.
  4. Click Create.

Grant the user access to the database

  1. On the MySQL Databases tile, click Add user to database (or similar).
  2. Pick the user and the database.
  3. Grant All privileges for typical apps. For more locked-down setups, pick specific privileges (SELECT, INSERT, UPDATE, etc.).
  4. Save.

The user now has access to the database. You can use these credentials in your application.

Connection details

When your application asks for database connection info, use:

  • Host: localhost (your app runs on the same server as the database)
  • Database name: youraccount_dbname (whatever you named it, with the prefix)
  • Username: youraccount_username
  • Password: the one you set
  • Port: 3306 (default; only specify if your app needs it)

For WordPress's wp-config.php:

define('DB_NAME', 'youraccount_wordpress');
define('DB_USER', 'youraccount_wpuser');
define('DB_PASSWORD', 'your-password-here');
define('DB_HOST', 'localhost');

phpMyAdmin

For browsing and managing the database visually, phpMyAdmin is one click from the portal:

  1. Go to Services → click hosting.
  2. Find the phpMyAdmin SSO tile.
  3. Click. We sign you in automatically.

phpMyAdmin lets you run SQL queries, browse tables, import/export databases, and manage users.

Backups

We back up your databases nightly as part of the standard hosting backup. You can also export from phpMyAdmin manually:

  1. Open the database in phpMyAdmin.
  2. Click Export.
  3. Pick "Quick" or "Custom" — Quick gets you a .sql file in seconds.
  4. Save it locally.

To restore: phpMyAdmin → Import → upload the .sql file.

For larger databases (>100MB), the backup tools in cPanel are faster than phpMyAdmin's web export. Or schedule regular exports via cron.

Connecting from outside

By default, only localhost connections are allowed — your application running on the same server. If you need to connect from outside (a developer running queries from their laptop, an analytics tool elsewhere):

  1. Allow remote MySQL in cPanel under "Remote MySQL."
  2. Add the IP that needs access. You can use % to allow any IP, but that's a security risk; prefer specific IPs.
  3. Use the public hostname (your server's hostname, not localhost) when connecting.

Generally we'd recommend not exposing MySQL publicly — use SSH tunneling or a VPN to reach the database instead.

Limits

How many databases you can have depends on your plan:

  • Most shared plans: no fixed database cap on most plans.
  • WordPress hosting: typically 5–10.
  • VPS: unlimited.

The exact number is on your plan's spec sheet.

Common questions

Why is my new database not working with my app yet?

A freshly created database has no users attached to it. You need to create a database user separately, then grant that user access to the database before your app can connect.

What host name do I use to connect to MySQL?

Use localhost, since your application runs on the same server as the database. Only switch to the public hostname if you're connecting from outside the server, and remote MySQL access has to be enabled first.

How do I connect to my database from my own computer?

By default only localhost connections are allowed, so you need to enable Remote MySQL in cPanel and add your IP address. Use the public hostname instead of localhost when connecting, though SSH tunneling or a VPN is the safer route for reaching the database.

How many databases can I create on my plan?

It depends on your plan: most shared plans allow no fixed database cap on most plans, WordPress hosting typically allows 5 to 10, and VPS plans are unlimited. Check your plan's spec sheet for the exact number.

Are my databases backed up automatically?

Yes, databases are backed up nightly as part of the standard hosting backup. You can also export a manual backup anytime from phpMyAdmin, and for databases over 100MB the cPanel backup tools are faster than the web export.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.