Skip to content
xaweho

Knowledge base · basic

Creating a MySQL database

Create a database and user in Plesk, connection details for PHP apps, quota, backup strategy.

basic ·

WordPress, Joomla, PrestaShop, your own PHP apps — almost every dynamic website needs a database. Plesk creates MySQL/MariaDB databases in one click, complete with user and connection details. Here’s what you should know before creating one.

MySQL vs. MariaDB

We run MariaDB (a compatible MySQL drop-in replacement). From your application’s point of view there’s no difference — mysql_connect, PDO::mysql, mysqli all work.

The Plesk UI says “MySQL”, technically it’s MariaDB.

Creating a database

In Plesk: Domain → Databases → +.

Fields:

  • Name: database name (typically domain_de_wp or domain_de_blog). Plesk automatically suggests something sensible.
  • Related site: pick the domain
  • Database server: usually only one available — leave the default
  • Create a default user: enable it — Plesk automatically creates a user named after the DB

Click OK → the DB is ready to use immediately.

Connection details

After creation, Plesk shows:

  • Database name: typically as entered
  • Database server: localhost (for PHP apps) or web1.xaweho.de (for external tools)
  • Username: often the same as the DB name
  • Password: randomly generated, visible in Plesk

You’ll need these details in your app config:

// WordPress wp-config.php
define('DB_NAME',     'domain_de_wp');
define('DB_USER',     'domain_de_wp_user');
define('DB_PASSWORD', '<the-generated-password>');
define('DB_HOST',     'localhost');

Managing database users

Plesk separates database and user:

  • One DB can have multiple users (e.g. one user with full rights, one read-only user for reporting)
  • One user can have rights on multiple DBs

In Plesk: Databases → database → Users tab → +.

Fields:

  • Username
  • Password
  • Rights: full rights, restricted rights, custom

Database quota

Per plan:

  • Start: 1 database
  • Pro: 10 databases
  • Power: 25 databases
  • Max: 50 databases

Quota = web space; databases are part of it. A 5 GB DB counts 5 GB against your storage.

phpMyAdmin

Direct browser access to the DB: Plesk → Databases → database → phpMyAdmin (auto-login).

More in Using phpMyAdmin.

Backing up a single DB

In Plesk: database → Backup tab → Create backup.

  • Format: SQL dump (default) or MySQL dump
  • Compressed: yes
  • Storage: local or external FTP

Restore from this backup: database → Backup → Restore.

Plus: the Plesk daily backup includes all DBs. More in Creating backups and restoring.

Connecting an external tool to the DB

If you want to connect, say, MySQL Workbench or TablePlus from your Mac to the DB:

Via SSH tunnel (SSH is included in every plan):

ssh -L 3306:localhost:3306 dein-user@web1.xaweho.de

Then connect locally to localhost:3306.

Alternative: enable remote access in the Plesk DB settings — Plesk opens port 3306 for your IP. Weaker from a security standpoint, so whitelist a specific IP only.

For many webhosting setups this isn’t needed — phpMyAdmin is enough.

DB performance

On webhosting you share the DB server with other customers. Performance:

  • Standard queries: fast, no problem
  • Complex joins / subqueries: slow with lots of rows — optimize your indexes
  • Very large DBs (>5 GB): not ideal on webhosting — consider a vServer

Tools like the WordPress database plugin “Query Monitor” show slow queries.

Common pitfalls

”Access denied for user ‘X’@‘localhost’”

  • Check username / password — typo in wp-config.php?
  • DB name correct?
  • Host: localhost for local apps, the external IP for external tools

”Maximum number of connections reached”

The DB server limits the number of parallel connections. On webhosting that limit is shared — if a website suddenly holds 500 connections open:

  • Plugin problems (WordPress: old plugins keeping connections open)
  • Poorly designed app
  • Clean up with mysql_close() / pdo->null

”Lost connection during query”

  • Very long queries → wait_timeout kicks in
  • For imports, use smaller chunks

Charset problem (broken umlauts)

The default is utf8mb4 — supports everything including emojis. When migrating from an old DB:

ALTER DATABASE deinedb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE deinetabelle CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Database hosts in DBeaver, MySQL Workbench, etc.

Setup for an external tool:

  • Host: web1.xaweho.de (or your specific server address)
  • Port: 3306 (default)
  • Username: DB user as in Plesk
  • Password: DB password
  • Database: DB name

Plus: enable remote access in Plesk (see above).

Frequently asked questions

How fast is the DB? Standard performance on webhosting. Exact numbers depend on query complexity, size, and other customers on the server. WordPress with caching (a plugin like “WP Rocket”) takes load off the DB.

Can I upload an SQL dump directly? phpMyAdmin → Import tab → pick the SQL file. The limit is upload_max_filesize (64 MB to 1 GB depending on plan). For larger dumps: upload via FTPS, then import via phpMyAdmin or the CLI — we’ll help.

How many DBs for one WordPress site? One. But: multisite uses one DB for all sites with table prefixes.

Can I choose different MySQL versions? We offer current MariaDB versions. If you have specific version requirements: open a ticket.

Can I see how big my DB is? phpMyAdmin → DB overview → “Size” column. Plus the Plesk statistics show disk usage per DB.

Deleting a database — are my files gone? Deleting a DB only deletes the database, not your website files. But: WordPress without its DB doesn’t work — make a backup first.

Read replicas / slave DBs? Not offered on webhosting. On a vServer / dedicated setup on request.

What if my DB suddenly shows Innodb is not started? Server problem. Open a ticket with us immediately — we’ll check.

What’s next

Related products
Tags
plesk mysql mariadb datenbank

Did this article help?

If not, open a ticket. If it did, we're happy about a referral — both sides get €25 credit on their customer account.