Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've read online on multiple occassions that MySQL is a bad database. The places I've read this include some threads on Reddit, but they never seem to delve in on why it's a poor product.

Is there any truth to this claim? I've never used it beyond a very simple CRUD scenario, and that was for a university project during my second year.

What pitfalls, if any, are there when choosing MySQL as your database?

share|improve this question

closed as too broad by gnat, MichaelT, Robert Harvey, Jim G., BЈовић Oct 27 '13 at 20:11

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

7  
The main pitfall, of course, is that Postgres zealots will try to make you insecure about your choice. –  Dan Ray Mar 3 '11 at 18:35
    
Wikimedia uses it, so it shouldn't be too bad. –  Arlen Beiler Mar 3 '11 at 21:29
add comment

6 Answers

up vote 28 down vote accepted

There are two different kinds of pitfalls, those from using MySQL as your flavor of RDBMS and those of using an RDBMS instead of other types of databases.

Using MySQL instead of alternate RDBMS's:

  • See this wikipedia comparison table for various comparisons of MySQL to other RDBMS's.
  • You will very likely prefer Microsoft SQL Server if you are building an ASP.NET web application, as the system is designed to work well together, I believe for both developers and IT managers
  • You may prefer Oracle if you are need of a more advanced DB set-up involving clustering (Oracle RAC) or advanced DB procedures. Not that MySQL doesn't support many of the features, but from what I've seen, you are much more likely to find an experienced DBA who knows this stuff for Oracle than MySQL.
  • See this question at SO for extensive comparisons of PostgreSQL to MySQL that say it better than I can.
  • Even more SO: Disadvantages of mysql versus other databases

Using RDBMS's instead of other types:

All that being said, MySQL is a great database, and I haven't worked at a company in the last 8 years that hasn't used it, in a wide variety of web applications (such as e-commerce, web sites/apps, enterprise/B2B, web games). For a large majority of typical web application use cases, it's a great choice.

share|improve this answer
3  
Great answer, especially for the MySQL vs. RDBMS and RDBMS vs. NoSQL –  Josh K Mar 3 '11 at 17:43
1  
SQL Server also has clustering and the advanced features. But you are corect that you will have more trouble finding a mySQL database expert who can handle such things or even knows how to design them. Those people mostly specialize in Oracle, db2 or SQL Server. –  HLGEM Mar 3 '11 at 18:27
    
@HLGEM, thanks for clarifying that, I meant to show what strengths Oracle has, not that other DBMS's don't support those features. SQL Server absolutely is capable in those areas, it just has the natural downside of Windows dependency for a company that doesn't use Windows for anything else. –  NickC Mar 3 '11 at 18:33
    
that is absolutely true, the Windows dependency hurts SQL Server. –  HLGEM Mar 3 '11 at 18:36
add comment

MySQL is now under the control of Oracle - although open source they still decide the direction of the project and what gets in.

In terms of being a bad database, no it's just 'simpler' than some others.

If you are looking for weaknesses I'll point them out for you, lets take PostgreSQL for example.

  1. MySQL lacks container types and arrays.
  2. MySQL lacks true sequences (they use auto-increment) - Postgres sequences allow multiple tables to use a single sequence so you can guarantee cardinality across multiple tables.
  3. Postgres is ACID compliant, MySQL is partially compliant.
  4. Postgres implements character varying, and text in the same manner (Toast Tables) - this approach most would argue is better than MySQL.
  5. Postgres only has one storage backend - this means you are guaranteed to have the same features everywhere.
  6. Postgres allows server-side functions written in TCL, Python, R and Perl.
  7. Postgres has good support for Asynchronous drivers in Python - I think it's a bit hit or miss with MySQL
share|improve this answer
add comment

Historically, it was weak on transaction support, and transactions are important if you need to keep a consistent database. Nowadays, the big rap is that Oracle owns it.

share|improve this answer
add comment

For a long time MySQL was more of a "toy" database. It didn't handle nested sub-selects, didn't support data partitioning, didn't offer multiple transaction isolation levels, didn't support triggers or stored procedures -- lots of stuff. Lots of people coming from Oracle or SQL Server background dismissed it.

I think the real reason you don't see many lists of MySQL's shortcomings is that it has a rather rabid fan base who delete or downvote any public mention of them. I know any time I've mentioned any problems I've had with it, the responses tend to be overwhelmingly negative.

share|improve this answer
add comment

MySQL is ACID compliant when used with the InnoDB storage engine - no reason not to so MySQL is ACID compliant (as of releases 5.5 InnoDB is the default storage engine).

MySQL gets a lot of bad press because it's often used (or was until the advent of NoSQL) as the RDBMS of choice by people who barely needed a database at all (and perhaps had limited RDBMS skills) and so used it in rather a clunky manner.

I've used MySQL a lot and since 5.x came along there's very little to complain about it for the 95% of installations that have middle of the road requirements.

share|improve this answer
add comment

Data corruption: http://planet.mysql.com/entry/?id=16232

It's from 2008. Let's hope things have changed in the meantime.

share|improve this answer
add comment