Quick verdict
Choose SQLite when the database belongs to one application on one machine: mobile and desktop apps, embedded devices, test suites, local tools and low to medium traffic sites. It needs no server, no configuration and no user accounts. Choose MySQL when many clients connect over a network, several processes need to write at the same time, or you need user permissions, replication and a managed cloud service. The SQLite project itself says it does not compete with client/server databases; it competes with fopen().
SQLite is a C library that implements a self-contained SQL database engine. Its documentation describes it as serverless in the classic sense: the process that wants to use the database reads and writes the database file on disk directly, with no intermediary server process, and there is nothing to install or configure. The whole database is a single cross-platform file. SQLite is in the public domain. The latest release listed on sqlite.org is 3.53.4 (24 July 2026).
MySQL is a client-server relational database owned by Oracle. A mysqld server process manages the data, and applications connect to it over TCP/IP or a local socket with a user name and password. The default storage engine, InnoDB, is transactional and multi-versioned. MySQL Community Server is free under GPLv2, and Oracle sells commercial editions and the MySQL HeatWave cloud service. MySQL now uses calendar versioning: 26.7.0 is the current Innovation release, and 8.4 and 9.7 are the Long-Term Support lines offered on the download page.
Side by side
| Aspect | SQLite | MySQL |
|---|---|---|
| Architecture | Embedded library; the app reads and writes one database file directly | Client-server; clients connect to a mysqld server |
| Setup and administration | Zero configuration, no server process | Install, configure, secure and maintain a server (or use a managed service) |
| Concurrent writes | One writer at a time per database file; WAL mode lets readers and the writer run concurrently | Many concurrent writers; InnoDB is multi-versioned with consistent non-locking reads |
| Typing | Flexible typing (type affinity); STRICT tables since 3.37.0 | Static column types enforced by the table definition |
| Users and permissions | None; access is controlled by file system permissions (no GRANT or REVOKE) | User accounts, roles and GRANT/REVOKE |
| Replication and HA | Not built in (a single file) | Asynchronous replication by default, semisynchronous and delayed replication, Group Replication |
| Size limit | About 281 TB theoretical maximum; sqlite.org suggests client/server above roughly a terabyte | Server-scale; limited by storage and configuration rather than a single file |
| Licence | Public domain; optional purchased Warranty of Title | Community: GPLv2; commercial licences from Oracle |
| Main trade-off | Simplest to deploy, but single writer and no network access | Multi-user and networked, but a server to run and secure |
Key differences
Embedded versus client-server
SQLite runs inside your application's process. There is no network protocol, no port to open and no service to monitor; you ship the library (or use the one built into your platform) and open a file. The sqlite.org "Appropriate Uses" page lists embedded devices and IoT, application file formats, websites with low to medium traffic, data analysis, caches and teaching as good fits.
MySQL is a separate server. That adds work (installation, configuration, backups, security patches, user management) but lets many applications on many machines share the same data. The same SQLite page names data on a separate machine from the application as a case where a client/server database is the better choice.
Concurrency: single writer versus many
sqlite.org states that SQLite supports an unlimited number of simultaneous readers but only one writer at any instant per database file. Write-ahead logging (WAL), available since 3.7.0, lets readers and the writer proceed concurrently, though there is still only one writer at a time. WAL is persistent once set, and the documentation notes it does not work over a network filesystem because processes must share memory.
-- SQLite: switch a database to WAL mode (persists in the file)
PRAGMA journal_mode=WAL;MySQL's InnoDB engine is multi-versioned: the reference manual describes consistent non-locking reads of earlier row versions and row-level locking, so many sessions can read and write at the same time. If your workload has many simultaneous writers, this is the main reason to choose a client-server engine.
Typing and schema changes
Ordinary SQLite tables use flexible typing: a declared column type sets an affinity, and SQLite converts values when it can do so losslessly but otherwise stores what it was given. For example, in an ordinary table a column declared INTEGER stores the string '123' as the integer 123, but stores 'xyz' as text. STRICT tables, added in 3.37.0, reject values of the wrong type and allow only INT, INTEGER, REAL, TEXT, BLOB and ANY. SQLite has no dedicated date or time type.
-- SQLite: opt in to strict typing
CREATE TABLE customers (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL
) STRICT;SQLite's ALTER TABLE supports renaming tables and columns, adding and dropping columns and, from 3.53.0, setting or dropping NOT NULL. Changing a column's type or adding constraints needs the documented rebuild procedure (create a new table, copy, drop, rename). MySQL enforces declared column types and supports a wider range of ALTER TABLE changes, plus a native JSON type that is validated on insert. SQLite also has JSON functions, built in by default since 3.38.0.
SQL dialect differences
Auto-increment keys. In SQLite a column declared INTEGER PRIMARY KEY is an alias for the rowid and is filled automatically. The AUTOINCREMENT keyword only prevents reuse of deleted ids, and sqlite.org advises avoiding it unless strictly needed because of the extra overhead. MySQL uses AUTO_INCREMENT.
-- SQLite
CREATE TABLE orders (
id INTEGER PRIMARY KEY,
total REAL
);
SELECT last_insert_rowid();-- MySQL
CREATE TABLE orders (
id INT NOT NULL AUTO_INCREMENT,
total DECIMAL(10,2),
PRIMARY KEY (id)
);
SELECT LAST_INSERT_ID();Upsert. SQLite has supported ON CONFLICT ... DO UPDATE since 3.24.0, using excluded for the incoming row. MySQL uses ON DUPLICATE KEY UPDATE; the manual marks the VALUES() function in this clause as deprecated and recommends a row alias instead.
-- SQLite
INSERT INTO phonebook (name, phone) VALUES ('Alice', '704-1212')
ON CONFLICT(name) DO UPDATE SET phone = excluded.phone;-- MySQL
INSERT INTO phonebook (name, phone) VALUES ('Alice', '704-1212') AS new
ON DUPLICATE KEY UPDATE phone = new.phone;Dates. SQLite stores dates as ISO-8601 text, Julian day numbers or Unix timestamps and works on them with functions such as date(), datetime(), strftime() and modifiers. MySQL has DATE, DATETIME and TIMESTAMP types and interval arithmetic.
-- SQLite: a week from today
SELECT date('now', '+7 days');
-- MySQL: a week from today
SELECT DATE_ADD(CURDATE(), INTERVAL 7 DAY); Limits and scale
sqlite.org documents a theoretical maximum database size of about 281 TB (at the maximum 65,536-byte page size), a default maximum of 2,000 columns per table and a default maximum string or BLOB length of one billion bytes. Its own guidance is to choose SQLite for device-local storage with low writer concurrency and less than a terabyte of content. MySQL runs as a server that can use replication and, through NDB Cluster or Group Replication, multi-server configurations, so it is built for shared, networked workloads rather than a single file.
Pricing and licensing
SQLite is in the public domain: anyone may copy, modify, use, compile, sell or distribute it for any purpose, commercial or not. For organisations that need a formal document (for example where public domain is not recognised), Hwaci, the company that employs the SQLite developers, sells a Warranty of Title; sqlite.org does not list a price on its copyright page.
MySQL Community Edition is free under GPLv2, with additional permissions described by Oracle. Oracle offers a commercial licence for embedding or bundling MySQL in another product without GPL obligations, and paid editions (MySQL Enterprise Edition, Standard Edition, Classic Edition, NDB Cluster CGE) plus the MySQL HeatWave cloud service. No prices are shown on the MySQL product or "How to Buy" pages in October 2026; Oracle directs buyers to the Oracle Store, its sales team or partners. Managed MySQL is also offered by cloud providers such as Amazon RDS, priced by each provider.
We describe licence terms only. If GPL obligations matter for software you distribute, take your own legal advice.
Pricing checked on the vendors' official pages on 7 October 2026. Prices change; confirm before buying.
Where each one leads
SQLite strengths
- No server to install, configure or secure; the database is one file
- Public domain, so there are no licence obligations to track
- Built into the platform on mobile phones and many operating systems, according to sqlite.org
- Well suited to tests, prototypes, local tools and application file formats
- WAL mode lets readers keep reading while a write is in progress
MySQL strengths
- Many concurrent readers and writers through InnoDB multi-versioning
- Network access for many applications and users, with accounts and GRANT/REVOKE
- Built-in replication options, including semisynchronous replication and Group Replication
- Static column types and a native JSON type validated on insert
- Widely available as a managed service, including Oracle's HeatWave and Amazon RDS
Limitations
SQLite limitations
- Only one writer at a time per database file, even in WAL mode
- Not designed for access over a network; WAL does not work on network filesystems
- Flexible typing in ordinary tables can store unexpected types unless you use STRICT tables
- Limited ALTER TABLE; many schema changes need a table rebuild
- No users, permissions or built-in replication
MySQL limitations
- A server to install, configure, back up, patch and secure, or a managed service to pay for
- GPLv2 for the Community edition; distributing MySQL inside commercial software may need a commercial licence
- Commercial edition prices are not published on mysql.com
- More moving parts than needed for a single-user or embedded application
When to choose each
Choose SQLite if
- The database is used by one application on one device, such as a mobile or desktop app
- You need a fast-to-set-up database for unit tests, prototypes or CI pipelines
- You want a single-file format to ship or exchange data
- Write concurrency is low and data stays well under a terabyte
Choose MySQL if
- Several applications, servers or users must read and write the same data over a network
- You expect many concurrent writes, such as a multi-user web application
- You need user accounts, permissions, replication or failover
- You want a managed database service from a cloud provider
When neither is right
- Advanced SQL features, extensibility and a permissive licence matter more than MySQL compatibility: look at PostgreSQL; see MySQL vs PostgreSQL.
- You want a MySQL-compatible server with a different governance and licence history: see MariaDB vs MySQL.
- Your data is document-shaped and changes structure often: see MongoDB vs PostgreSQL and SQL vs NoSQL.
- Heavy analytical queries over large datasets are a job for a column-oriented engine or data warehouse rather than either of these.
Final recommendation
These two rarely compete for the same job. SQLite is the right default for data that belongs to a single application on a single machine, and for tests and prototypes, because there is nothing to run or secure. MySQL is the right choice once several clients need to write to shared data over a network, or you need permissions, replication and a managed service. A common pattern is SQLite for local development or embedded storage and a client-server engine in production; if you do this, watch the dialect differences above (auto-increment, upsert and dates) and consider SQLite STRICT tables so type behaviour is closer to production.
Frequently asked questions
Can SQLite be used for a website?
Yes, for many sites. sqlite.org says SQLite works well for low to medium traffic websites and that the main constraint is write concurrency: only one writer at a time per database file. If your site has many simultaneous writes, or several web servers need the same database, a client-server engine such as MySQL fits better.
How big can an SQLite database be?
sqlite.org documents a theoretical maximum of about 281 TB at the largest page size (about 17.5 TB at the default 4,096-byte page size). Its guidance is that a client/server database is usually a better choice once data approaches a terabyte.
Is SQLite free for commercial use?
Yes. SQLite is in the public domain and may be used, modified and distributed for any purpose, commercial or not. A Warranty of Title can be bought from Hwaci for organisations that need a formal licence document.
Does SQLite support AUTO_INCREMENT like MySQL?
Not with that keyword. In SQLite, a column declared INTEGER PRIMARY KEY is filled automatically. SQLite also has an AUTOINCREMENT keyword that stops deleted ids being reused, but its documentation advises avoiding it unless strictly needed.
Is MySQL free?
MySQL Community Edition is free under GPLv2. Oracle sells commercial licences and editions (for example MySQL Enterprise Edition) and the MySQL HeatWave cloud service; prices are not published on mysql.com.
Sources
- SQLite: Appropriate uses
- SQLite: Serverless
- SQLite: Write-ahead logging
- SQLite: Implementation limits
- SQLite: STRICT tables
- SQLite: Autoincrement
- SQLite: UPSERT
- SQLite: Copyright (public domain)
- MySQL Reference Manual: INSERT ... ON DUPLICATE KEY UPDATE
- MySQL Reference Manual: InnoDB multi-versioning
- MySQL Reference Manual: Replication
- MySQL licensing (OEM and commercial)
- MySQL Community Server downloads
Checked October 2026.
How we research comparisons: our editorial method.