What is MySQL?

MySQL is an open-source relational database used by a large share of websites and online shops. It stores data in tables, speaks SQL and replicates easily.

Where is MySQL used?

Almost everywhere the web runs on PHP, and well beyond it. WordPress, Drupal, Magento, PrestaShop, Nextcloud and many forum and ticketing systems expect MySQL or its fork MariaDB. Large social and video platforms have run it at enormous scale with sharding. Its strengths are simple setup, predictable performance on primary key lookups, mature replication and a vast pool of people who know how to operate it.

What is InnoDB?

The default storage engine, responsible for how tables are stored on disk and how transactions behave. InnoDB organises each table as a B-tree clustered on the primary key, so rows with neighbouring keys sit physically together, and secondary indexes point to the primary key. It provides ACID transactions, row-level locking, MVCC so readers do not block writers, foreign keys and crash recovery through its redo log. Older engines such as MyISAM lack transactions and should not be used for new tables.

Which release line belongs in production?

A long-term support release from the vendor repository or your distribution. MySQL now ships two tracks: LTS releases, such as 8.4, that receive fixes for years without new features, and innovation releases that add features every few months. Production servers belong on LTS. MariaDB follows its own numbering with its own long-term releases and is packaged directly in Debian and the Enterprise Linux family; it remains close to MySQL for most applications, though the two have drifted apart in replication details, JSON handling and some newer features.

NeedPractical choice
Application documents MySQL 8 featuresMySQL 8.4 LTS from the vendor repository
Distribution packages and Galera clusteringMariaDB long-term release
PHP CMS or shopEither; follow the application's support list

How does MySQL replication work?

The source writes every change to its binary log, and each replica pulls and applies those events. With GTIDs, every transaction has a global identifier, which makes pointing a replica at a new source after failover far simpler. Group replication adds a consensus layer so a cluster of three or more members agrees on writes and elects a new primary automatically. Across our servers, replication runs over the public ports; enable TLS for replication users or tunnel it through WireGuard.

CHANGE REPLICATION SOURCE TO
  SOURCE_HOST='10.70.0.1', SOURCE_USER='repl_ro', SOURCE_PASSWORD='use-a-long-secret',
  SOURCE_AUTO_POSITION=1, SOURCE_SSL=1;
START REPLICA;
SHOW REPLICA STATUS\G

Which my.cnf settings deserve attention first?

The buffer pool first, then the redo log and connection limits. On a dedicated database host, give innodb_buffer_pool_size most of the memory, leave room for connections and the operating system, and size the redo log so checkpoints are not constant during write bursts. On BUSINESS-2 2024 with 64 GB DDR5:

[mysqld]
innodb_buffer_pool_size        = 46G   # leaves 18 GB for sessions and the OS
innodb_buffer_pool_instances   = 8
innodb_redo_log_capacity       = 8G
innodb_flush_method            = O_DIRECT   # skip double caching in the kernel
innodb_io_capacity             = 4000
max_connections                = 400
slow_query_log                 = ON
long_query_time                = 0.5

Raise innodb_io_capacity on NVMe, since the default suits spinning disks. Then read the slow query log weekly; one missing index usually matters more than any server setting.

How should MySQL be backed up?

With both logical and physical copies, stored off the server. mysqldump --single-transaction or the parallel dump utility in MySQL Shell produce portable SQL; Percona XtraBackup or mariadb-backup copy data files while the server runs, which is much faster for large databases. Keep binary logs to replay changes up to any moment. We do not sell a backup storage product, so send copies to a second server, for instance a Storage line machine in another data centre. Our Ship database dumps to a second server guide shows a schedule.

What hardware does MySQL need?

Enough memory to hold the hot data, and NVMe for the redo log and random reads. A typical shop or content site runs well on ESSENTIAL-3 with 32 GB DDR4. Busy databases with hundreds of concurrent connections benefit from BUSINESS-4 2026, whose high clock speed helps the many short queries MySQL usually serves. Our Database servers page sizes larger systems, and MySQL or PostgreSQL compares MySQL with its main open-source rival.

Machines for MySQL

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-3AMD Ryzen 9 5900X1232 GB2x 512 GB SSD NVMe1 Gbps unmetered$61.20
ESSENTIAL-SAMD Ryzen 7 9700X864 GB2x 512 GB SSD NVMe1 Gbps unmetered$46.20
BUSINESS-2 2024AMD EPYC 4344P864 GB2x 960 GB SSD NVMe3 Gbps unmetered$109.80
BUSINESS-4 2026AMD EPYC 4585PX1664 GB2x 960 GB SSD NVMe3 Gbps unmetered$212.40

Related pages

MySQL or PostgreSQL

Choosing between the two most popular open-source databases: SQL features, replication, extensions, operations and the hardware each wants on a dedicated server.

Read more

Database servers

NVMe machines with large memory for PostgreSQL, MySQL, MariaDB and MongoDB, from a single primary to replicated pairs.

Read more

Ship database dumps to a second server

Schedule compressed, encrypted MariaDB or PostgreSQL dumps and send them to a Storage machine elsewhere, with retention and restore tests.

Read more

WordPress hosting on bare metal

Run WordPress sites on your own dedicated server: nginx and PHP-FPM pools, MariaDB, object and page caching, WP-CLI, cron and many sites per machine.

Read more

Questions and answers

Is MySQL free to use?

The community edition is free and open source under the GPL. A commercial edition with extra tools also exists. MariaDB is a fully open-source fork.

How does MariaDB relate to MySQL?

MariaDB is a fork of MySQL that stays compatible for most applications but has its own releases, Galera clustering built in and some different features.

How much memory should MySQL use?

On a dedicated database host, give the InnoDB buffer pool roughly 60 to 75 percent of memory and leave the rest for connections and the operating system.

Can I run MySQL replication between two rented servers?

Yes. Replication runs over the public ports; protect it with TLS for the replication user or a WireGuard tunnel between the machines.

Do you provide managed MySQL?

No. You install and run MySQL yourself with full root access, on any of the Linux distributions we install.