Skip to content
Explainer · Install a database

Database Guides: Install, Run in Docker, Back Up and Migrate

Practical, research-based guides for getting a database running and keeping it safe: installing the free editions of the main engines, running them in Docker, backing them up and migrating between them. Each guide follows the vendor's own documentation, states the versions it covers and the date it was checked, and links to the official download, never to a mirror.

Steps checked 8 October 2026 against the official documentation for each product. Versions covered: SQL Server 2025, PostgreSQL 18, MySQL 8.4 LTS, Oracle AI Database 26ai Free. Next review due April 2027. Installers, versions and download pages change; follow the official page if a step differs.
Short answer
  • For learning SQL on your own computer, a native install of a free edition is the simplest start; every major engine has one.
  • Docker suits developers who need several engines or versions side by side, or a disposable database for a project; data must live in a volume to survive.
  • A free cloud tier avoids installing anything and works from any computer, within monthly limits set by the provider.
  • Free editions differ in what they allow: SQL Server Developer is for development only, while SQL Server Express, PostgreSQL, MySQL Community, SQLite and Oracle Database Free can run in production within their terms.
How we know: Research-based: free editions, licences and limits were checked on each vendor's official site (Microsoft, the PostgreSQL Global Development Group, Oracle, MariaDB Foundation, MongoDB, SQLite) and in Docker's documentation on 8 October 2026. The guides describe documented procedures; CodeWithSQL has not run them for these pages, and each guide says so.

Native install, Docker or a free cloud tier?

There are three common ways to get a database to practise on or build with. They give you the same SQL, so the choice is about convenience, resources and how long the database needs to live.

Three ways to run a database for learning and development
Native installDocker containerFree cloud tier
What you installThe database server (and usually a GUI tool) on your computerDocker, then one image per engine and versionNothing locally except a client tool
Best forBeginners on one computer; a course or a single projectDevelopers needing several engines or versions, CI pipelines, throwaway databasesWorking from several computers; trying a managed service
LimitationsUpgrades and uninstalls are manual; one version per instanceData lost on docker rm unless it is in a volume; some images are x86-64 onlyMonthly compute and storage caps; needs an internet connection and an account
Start withThe install guide for your engineThe Docker guide for your engineThe free database hosting overview

Our recommendation

If you are following the SQL Beginner Course, install one engine natively, with its usual GUI tool, and stay with it until the basics are familiar. Move to Docker when you need a second engine, a specific version or a clean database for each project. Choose a cloud tier when you cannot install software on your computer, or when the database must be reachable from more than one machine.

Free editions of the main databases

Every engine below can be downloaded free from its vendor. The limits column shows what the free edition does not allow, as stated on the vendor's pages on 8 October 2026; the guide column names the CodeWithSQL guide (published guides are listed by section further down this page).

Free database editions and the guide for each (vendor pages, checked 8 October 2026)
EngineFree editionLicence and limitsGuide
SQL ServerExpress; Standard Developer and Enterprise DeveloperExpress: production allowed, 50 GB per database in SQL Server 2025. Developer editions: development and test onlySQL Server Express, How to Install SQL Server, SQL Server in Docker
PostgreSQLThe whole product (one edition)PostgreSQL License, a liberal open source licence; each major version supported for 5 yearsHow to Install PostgreSQL; PostgreSQL in Docker
MySQLMySQL Community ServerOpen source; choose the 8.4 LTS series or the Innovation seriesHow to Install MySQL on Windows; MySQL and MariaDB in Docker
MariaDBMariaDB ServerOpen source; in the standard repositories of major Linux distributionsMySQL and MariaDB in Docker
OracleOracle AI Database Free (26ai)Up to 2 CPUs, 2 GB RAM and 12 GB of user data; no patchesOracle Database Free and XE
MongoDBMongoDB Community ServerFree download; MongoDB Atlas is the managed serviceHow to Install MongoDB; MongoDB and Redis in Docker
SQLiteThe whole library (one edition)Public domain; serverless, so there is no server to installHow to Install SQLite

Running databases in Docker

Docker packages software in containers, isolated environments that contain everything the application needs, so a database runs the same way on Windows, macOS and Linux without installing the engine on the host. PostgreSQL, MySQL and MongoDB are published as Docker Official Images on Docker Hub, and Microsoft publishes SQL Server images in its own registry, which makes it easy to run PostgreSQL 18 for one project and PostgreSQL 16 for another.

Two points catch people out. First, a container's data disappears when the container is removed; Docker describes volumes as the preferred way to persist data, and each of our Docker guides uses one. Second, not every image runs on every processor: Microsoft supports its SQL Server images only on Intel and AMD x86-64 hosts, which matters on Apple silicon Macs. Docker Desktop is free for personal use, education and small businesses, but larger organisations need a paid subscription.

Free cloud database tiers

Cloud providers offer free allowances that are enough for learning. For example, Microsoft's Azure SQL Database free offer gives each database 100,000 vCore seconds of compute, 32 GB of data and 32 GB of backup storage a month, for up to 10 databases per subscription. Limits, regions and the end of free periods vary, so read the provider's current terms before you rely on one. Our cloud section compares them: free database hosting, the Azure SQL Database free tier, the AWS RDS free tier and free PostgreSQL hosting.

After the install: backups and migration

The backup guides cover the native dump tools, mysqldump for MySQL and pg_dump with pg_restore for PostgreSQL. Whatever tool you use, practise a restore on a spare database before you need one.

The migration guides cover moving between engines: a general step-by-step method with a checklist, SQL Server Migration Assistant, and the common SQL Server to PostgreSQL and MySQL to PostgreSQL moves. For a printable list, see the database migration checklist. When an install or connection fails, the SQL Server error library explains the common error numbers.

All guides

Install a database

Run databases in Docker

Back up and restore

Migrate between databases

Frequently asked questions

Which database should a beginner install first?

Any of SQL Server Express or Developer, PostgreSQL or MySQL Community works for learning SQL. Pick the one your course, job or project uses; the core SQL is the same. Our SQL Beginner Course uses T-SQL (SQL Server) by default.

Is Docker better than installing a database directly?

Not better, different. Docker makes it easy to run several engines or versions and to throw a database away, but adds Docker itself and the need for volumes. A native install is simpler if you only need one database.

Are free database editions safe to use in production?

Some are licensed for it: SQL Server Express, PostgreSQL, MySQL Community, MariaDB and SQLite. SQL Server Developer editions are for development and test only. Oracle AI Database Free may be deployed anywhere, but Oracle provides no patches for it and recommends supported editions for production.

Where should I download database installers from?

Only from the vendor's own site or package repository. Every guide here links to the official download page and never to a mirror.

Sources

Checked 8 October 2026.

How we research guides: our editorial method. We link only to official downloads and never host installers.

Database installed?

Write your first queries with the free beginner course, then practise on real problems.