MySQL
MySQL is an open-source relational database management system (RDBMS) owned by Oracle, first released in 1995 and acquired in 2010.
Publisher review
MySQL is an open-source relational database management system (RDBMS) owned by Oracle, first released in 1995 and acquired in 2010. It is designed for web applications, e-commerce platforms, and online publishing, where its reliability and performance under high concurrency are well-documented. MySQL serves developers and enterprises needing a mature SQL database with ACID compliance via the InnoDB storage engine, supporting complex queries and transactional workloads. It is particularly suited for teams that prioritize ease of setup, broad ecosystem support, and a large talent pool, though its licensing model introduces complexity for commercial deployments.
MySQL operates on a dual-licensing model: the Community Edition is free under the GNU General Public License (GPL), while paid editions (Standard, Enterprise, Cluster CGE) add commercial features, Oracle support, and legal indemnification. Key capabilities include full ACID compliance, advanced geospatial support (via PostGIS-like extensions), built-in machine learning through HeatWave, and real-time analytics on live transactional data. The database scales horizontally with replication and clustering, and its integration with MySQL HeatWave provides in-database ML and lakehouse analytics. However, commercial features like security audit, backup, and monitoring tools are locked behind paid subscriptions, and embedding MySQL in distributed products requires a separate OEM license.
As of Stack Overflow's 2024 developer survey, MySQL is the second most popular database technology at 40.3% usage, trailing PostgreSQL (48.7%) and ahead of SQLite (33.1%). Its primary competitors are PostgreSQL and MariaDB, both open-source alternatives. PostgreSQL is often favored for advanced features like custom indexing, extensibility, and superior performance out of the box, as noted in Reddit discussions. MariaDB, a fork by MySQL's original creator, offers a fully open-source stack without Oracle's licensing constraints. MySQL's market position is strong in legacy web apps and Oracle-ecosystem shops, but it is losing ground to PostgreSQL in new projects.
The honest trade-offs: MySQL Community Edition is free for internal use, but GPL copyleft terms may restrict commercial distribution, pushing buyers toward paid editions. Oracle's licensing arbitration history is spotty, and commercial licenses are priced per server by socket count, not cores, which can be expensive at scale. Cloud MySQL on AWS, Azure, or Google does not require an Oracle subscription, but on-premises deployments may incur significant costs for Enterprise or Cluster CGE editions. Performance comparisons show MySQL often requires tuning to match PostgreSQL's defaults, and advanced features like geospatial support lag behind PostGIS.
How it works
-
Full ACID compliance
InnoDB storage engine provides atomic, consistent, isolated, and durable transactions for reliable data processing in OLTP workloads.
-
Advanced geospatial support
Supports spatial data types and indexing for location-based queries, though less mature than PostgreSQL's PostGIS extension.
-
Built-in machine learning
MySQL HeatWave offers in-database ML and generative AI capabilities, enabling model training and inference without data movement.
-
Real-time analytics
HeatWave allows analytics on live transactional data, reducing the need for separate ETL pipelines and data warehouses.
-
High concurrency and scalability
Supports thousands of concurrent connections with replication, clustering, and sharding for horizontal scaling.
-
Integration with MySQL HeatWave
A cloud service combining transactions, lakehouse analytics, and ML with automated query optimization and multi-cloud support.
-
Multiple editions
Offers Community (free GPL), Standard, Enterprise, and Cluster CGE editions, each with different feature sets and support tiers.
Strengths and trade-offs
Strengths
- MySQL is the second most popular database in Stack Overflow's 2024 survey, with 40.3% usage, ensuring a large pool of developers, tutorials, and community support.
- The Community Edition is free under GPL for internal use, making it accessible for startups, web apps, and learning without upfront licensing costs.
- InnoDB provides full ACID compliance and crash recovery, delivering reliable transactional processing for e-commerce and financial applications.
- MySQL HeatWave integrates transactions, analytics, and machine learning in one cloud service, reducing data movement and operational complexity.
Trade-offs
- Commercial features like security audit, backup, and monitoring tools require paid editions, with Enterprise Edition priced per server by socket count.
- Oracle's track record for licensing arbitration is spotty, and GPL copyleft terms may restrict commercial distribution without a paid license.
- Performance out of the box often lags behind PostgreSQL, requiring manual tuning for complex queries or high-concurrency workloads.
- Advanced geospatial support is less capable than PostgreSQL's PostGIS, limiting suitability for GIS-heavy applications.
Pricing context
MySQL Community Edition is free under GPL. Paid editions (Standard, Enterprise, Cluster CGE) are licensed per server with annual subscription pricing based on socket count, not cores. OEM embedding requires a separate commercial license. Cloud MySQL on AWS, Azure, or Google does not require an Oracle subscription.
Getting started with MySQL
-
Download and install MySQL
Go to the official MySQL website and download the Community Server installer for your operating system. Run the installer, choose the setup type (e.g., Developer Default), and follow the prompts to complete installation, including setting a root password.
-
Connect to MySQL server
Open a terminal or command prompt and run 'mysql -u root -p'. Enter the root password you set during installation. This connects you to the MySQL server, allowing you to execute SQL commands and manage databases.
-
Create a database and table
Run 'CREATE DATABASE mydb;' to create a new database. Then use 'USE mydb;' to select it. Create a table with 'CREATE TABLE users (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100));' to store data.
-
Insert and query sample data
Insert a row with 'INSERT INTO users (name) VALUES ('Alice');'. Retrieve it with 'SELECT * FROM users;'. This verifies your database setup and confirms that basic CRUD operations work as expected.
-
Schedule a backup job
Use the mysqldump utility to back up your database: run 'mysqldump -u root -p mydb > backup.sql'. Automate this by adding the command to a cron job (Linux) or Task Scheduler (Windows) for daily execution.
Frequently Asked Questions
What is MySQL and what is it used for?
MySQL is an open-source relational database management system owned by Oracle, first released in 1995. It is designed for web applications, e-commerce platforms, and online publishing, offering reliability and performance under high concurrency with ACID compliance via the InnoDB storage engine.
Is MySQL free to use?
MySQL Community Edition is free under the GNU General Public License for internal use. Paid editions like Standard, Enterprise, and Cluster CGE add commercial features, Oracle support, and legal indemnification, with pricing per server based on socket count. Cloud MySQL on AWS or Azure does not require an Oracle subscription.
What are the key features of MySQL?
MySQL offers full ACID compliance through the InnoDB storage engine, advanced geospatial support, built-in machine learning via HeatWave, real-time analytics on live transactional data, and high concurrency with replication and clustering. It also integrates with MySQL HeatWave for combined transactions, analytics, and ML.
How does MySQL compare to PostgreSQL?
MySQL is the second most popular database at 40.3% usage, but PostgreSQL is often favored for advanced features like custom indexing and superior performance out of the box. MySQL requires more tuning for complex queries and lags in geospatial support compared to PostgreSQL's PostGIS extension.
What are the weaknesses of MySQL?
Commercial features like security audit and backup require paid editions, and Oracle's licensing arbitration history is spotty. Performance out of the box often lags behind PostgreSQL, requiring manual tuning. GPL copyleft terms may restrict commercial distribution without a paid license.
What is MySQL HeatWave?
MySQL HeatWave is a cloud service that integrates transactions, lakehouse analytics, and machine learning in one platform. It enables in-database ML and generative AI, real-time analytics on live transactional data, and automated query optimization, reducing the need for separate ETL pipelines and data warehouses.
Alternatives
How MySQL compares
Direct head-to-head against 3 competitors. Picked by 7wData.
MySQL
- Pricing
- MySQL Community Edition is free under GPL. Paid editions (Standard, Enterprise, Cluster CGE) are licensed per server with annual subscription pricing based on socket count, not cores. OEM embedding requires a separate commercial license. Cloud MySQL on AWS, Azure, or Google does not require an Oracle subscription.
- Target
- MySQL is an open-source relational database management system (RDBMS) owned by Oracle, first released in 1995 and acquired in 2010.
- Strength
- MySQL is the second most popular database in Stack Overflow's 2024 survey, with 40.3% usage, ensuring a large pool of developers, tutorials, and community support.
- Watch for
- Commercial features like security audit, backup, and monitoring tools require paid editions, with Enterprise Edition priced per server by socket count.
MariaDB
- Pricing
- Free open-source
- Target
- MySQL-compatible workloads
- Deployment
- On-prem/cloud
- Strength
- Drop-in MySQL replacement with additional storage engines
- Watch for
- Some enterprise features require paid subscription
PostgreSQL
- Pricing
- Free open-source
- Target
- Complex relational workloads
- Deployment
- On-prem/cloud
- Strength
- Advanced SQL features and JSON support
- Watch for
- Higher memory requirements than MySQL
AWS Aurora MySQL
- Pricing
- $59.86/month entry-level
- Target
- Cloud-native MySQL workloads
- Deployment
- AWS only
- Strength
- Auto-scaling with 5x MySQL throughput
- Watch for
- 2-3x cost premium over standard MySQL
User reviews
No user reviews yet. Be the first to write one.
Sources
Reporting on this tool draws on these publicly available sources.