If you’re interested in Google’s Go programming language, perhaps you aren’t sure what drivers to use for MySQL. The good news is there are excellent drivers for MySQL.

There are several opensource ones on GitHub and elsewhere, but the driver I recommend is https://github.com/go-sql-driver/mysql/. Why?

  • It is pure Go, not a wrapper around a C library, and is liberally licensed.
  • It is high performance. A lot of work has gone into making it avoid allocations and consume minimal CPU.
  • It is an excellent example of idiomatic Go in action. The authors understand how the database/sql package is supposed to be used. Some drivers aren’t written to this standard and are clumsy or don’t take advantage of database/sql.

This is the driver we use at VividCortex in production. We have had no issues with this driver at all. Credit for that should go to three people who’ve put a large amount of work into it: Julien Schmidt, Arne Hormann, and Brad Fitzpatrick. There are more, but those are the key contributors in my opinion.

If you’re curious how to write idiomatic Go code when accessing a database through the database/sql package with this driver, I recommend http://go-database-sql.org/, which has benefited greatly from the same contributors, as well as a variety of community members and experts at VividCortex.

Photo Credit

Done! Now Read These:

Ultima Online and the History of Sharding

The backstory of database sharding

Bloom Filters Made Easy

Bloom filters are easy to understand with the right explanation.

Continuous integration and deployment

It feels like continuous integration and deployment is under-solved.