StarDomain

MySQL Databases

Updated 2 min read
Knowledge base article
Contents (4 sections)

Creating one

Open the Databases tab and choose New Database. The name must start with a letter and use only lowercase letters, digits and underscores.

Each database is created with its own user and a generated password. The password is shown once. Copy it into your application's configuration before you leave the page — it cannot be shown again, and the only remedy is to delete the database and create another.

Your databases are prefixed with your container's own identifier, so the name you see in the panel may be longer than the one you typed. Use the full name shown.

Connecting from your site

Use host localhost from inside your own container. A typical WordPress wp-config.php:

php
define( 'DB_HOST', 'localhost' );
define( 'DB_NAME', 'your_full_database_name' );
define( 'DB_USER', 'your_database_user' );
define( 'DB_PASSWORD', 'the password shown when you created it' );

Remote access

Databases are reachable only from your own container. There is no remote MySQL access and no phpMyAdmin. This is deliberate: an internet-facing database is the single most common way a small site is compromised.

To work with your data, use a tool inside your site (for example Adminer uploaded to public_html and removed afterwards), or restore a backup locally.

Deleting

Deleting a database drops it and its user immediately and cannot be undone. Take a backup first if you are not certain — the Backups tab includes your databases.

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
MySQL Databases — Container Hosting