Disadvantages of MySQL
MySQL is a reliable and very widespread database, but it is not the best choice for every task. Where its weak points are, what to watch out for and when it pays to choose another database.
Weak points and pitfalls
- Tolerant settings on some servers. Without strict mode, MySQL and MariaDB silently shorten text that is too long or store a substitute value instead of an invalid one and only report a warning. Strict mode is the default in current versions, but hosting providers often turn it off. The query SELECT @@sql_mode; shows which mode the server uses – in strict mode it contains STRICT_TRANS_TABLES or STRICT_ALL_TABLES.
- Differences between MySQL and MariaDB. MariaDB started as a fork of MySQL and the two databases keep drifting apart. Common SQL works the same in both, but they differ in default settings (for example the ONLY_FULL_GROUP_BY mode), some functions, the JSON data type and the behavior of the optimizer. When you move between them, the application needs to be tested.
- Changes to the structure cannot be rolled back. Statements that change the structure of tables (CREATE, ALTER, DROP) automatically commit the running transaction and cannot be undone with ROLLBACK. A change of structure and data therefore cannot be done as one unit that is canceled as a whole when an error occurs. PostgreSQL can change the structure inside a transaction.
- Fewer advanced features than PostgreSQL. PostgreSQL has richer data types (arrays, ranges of values, custom types), more options for indexing JSON data and extensions such as PostGIS for geographic data. MySQL started to enforce CHECK constraints only in version 8.0.16 – older versions accepted them but ignored them.
- Full-text search and word forms. The built-in FULLTEXT index does not know other forms of a word (a search for run does not find running) and leaves very short words out of the index. In languages with many word forms the problem is even bigger. For good search in text, separate search tools such as Elasticsearch are used.
- Spreading writes over several servers. One server can handle even a very busy website. Common replication, however, spreads mainly the reads – solutions with several servers that accept writes (for example Galera Cluster for MariaDB) exist, but running them is much more complex.
- Ownership and license. MySQL belongs to Oracle, which offers a paid Enterprise edition with extra tools next to the free Community edition (GPL license). Part of the community has therefore moved to MariaDB, which was founded by one of the original authors of MySQL (as of September 2026).
What is no longer true
Older comparisons say that MySQL does not support transactions, foreign keys, views, stored procedures or triggers and that it is not enough for demanding applications. That was true for very old versions and for the old MyISAM table type. Current versions with the default InnoDB table type can do all of that, MySQL 8.0 and MariaDB 10.2 added for example window functions and queries with the WITH clause, and MySQL runs even very busy websites.
When to choose another database
- PostgreSQL – more complex data models, analytical queries, geographic data and an emphasis on following the SQL standard exactly.
- SQLite – small applications, prototypes and tools without a database server. The whole database is one file.
- MySQL or MariaDB remain a good choice for common websites, e-shops and content management systems. They are available with almost every hosting provider and most PHP web applications expect them.
Related articles:
Column data types
Grouping and totals (GROUP BY)
Inserting, updating and deleting data