Choose a plan

Creating a MySQL database and user

How to create a MySQL database and a user with a password in Enhance and link them, plus how to import and export an SQL file.

  • Updated
guide · databases and php
Steps
10
Reading time
5min
Sections
7
Start the guide

What you get

An empty database, a user with full privileges on it, and the connection details any application asks for: a manually installed WordPress, an online store, a PHP script. How many databases you can have depends on your plan: 5 on Starter, unlimited on Store and Multi-site — see the web hosting plan comparison.

Installing WordPress from Enhance? Then you don't need to do anything here: the installation creates the database itself.

Before you start

  • The server uses MariaDB 11.4, which is compatible with MySQL. Applications that require “MySQL” work.
  • Enhance automatically adds a prefix in front of names: the website's username, followed by _. You'll see it in front of the box where you enter the name. If the prefix is, for example, site_abc1_ and you enter magazin, the database will be called site_abc1_magazin.
  • The database name can contain lowercase letters, digits and _, up to 64 characters in total, prefix included. The username can contain letters, digits, -, _ and ..
  • The Starter plan includes 5 databases; on the other plans the number is unlimited.
  • Have a safe place ready to note down the password, for example a password manager.
  • The names in this guide are the ones from the English Enhance interface. If Enhance opens in another language, you can switch it to English from the top right: your photo or initials » “My account” » “Language”.

Steps — the database and user in a single form

  1. Log in to Enhance at https://server.nbt-host.com. In the left-hand menu, click “Websites”, then your website.
  2. Open the “Databases” tab and click “Add database”.
  3. Under “Database name”, enter the database name without the prefix: Enhance adds it itself.
  4. Further down, under “Add database user”, click “Create new user” and fill in “Username” and “Password”. The key button next to the password generates a long one. If you already have a user you want to use, select it from the list instead of creating a new one.
  5. Leave “All database privileges” checked, so the user has full privileges on the database. Don't change anything under “Advanced”.
  6. Click “Add”. The database appears in the list, and the user already has access to it.

Steps — a separate user

  1. In the “Databases” tab, click “Add user”.
  2. Fill in “Username” and “Password”.
  3. Under “Database access”, check the database or databases the user is allowed to access and leave “All database privileges”.
  4. Click “Add”.

You'll find existing users in the “Users” tab, next to “Databases”.

Connection details for your application

WhatValue
Server (host)localhost
Database namethe full name, with prefix: site_abc1_magazin
Userthe full name, with prefix: site_abc1_ana
Passwordthe one you chose in the user step

On the database page, under “Connection info”, Enhance shows you the same details. For WordPress, they go in wp-config.php, under DB_NAME, DB_USER, DB_PASSWORD and DB_HOST (localhost).

Import and export

Open the database from the list in the “Databases” tab. On its page you have:

  • “Import SQL file”: click “Upload” and choose the file. It accepts .sql, as well as compressed .gz or .zip files, up to 500 MB. Its contents are added to the selected database.
  • “Export SQL file”: click “Download” and you get the whole database in a .sql.gz file.

phpMyAdmin isn't available in your account for now. For anything you can't do from the database page, for example editing a row in the database by hand, write to us.

If something doesn't work

  • “Error establishing a database connection” (WordPress) or “Access denied for user”. Usually you entered the name without the prefix, the user has no access to the database, or the password is wrong. The host is localhost.
  • You can't connect to the database from your computer, for example with HeidiSQL or MySQL Workbench. The database server only accepts connections from the server itself. You import and export from Enhance, and applications on your website connect through localhost.
  • You can't create a new database. You've reached your plan's limit (5 on Starter). Delete one you don't use, with “Delete” from its menu in the list, or switch to a bigger plan.
  • The import fails because the file is too large. Compress it (.gz or .zip) and try again. If it's still over 500 MB, write to us and we'll import it for you.
  • The import gives an access error or the data doesn't appear in the database. The .sql file probably contains CREATE DATABASE or USE commands with a different database name. Delete those lines from the file, or export only the database tables again, then import it.
  • You forgot the user's password. In the “Users” tab, open the user, click “Reset” next to “Password”, enter the new password under “New password” and click “Change password”. Then put the new password in your application too, for example in wp-config.php.
Support

Stuck? We'll do it together.

Tell us which step isn't working and, if you can, send a screenshot. We reply during business hours.

Phone and WhatsApp+40 775 396 021
HoursMonday–Friday, 9:00–18:00 Romanian time (EET/EEST)

Never send us your password on WhatsApp or by email. What information helps us solve it on the first try: how to ask for help.