RAILS PORTAL
Home Blog Gems Links Categories Get in Touch
Start typing to search…
Tip: Press / to open search
View all results
Rails Portal logo RAILS PORTAL

mysql2

Databases & ActiveRecord
mysql2 is the primary MySQL adapter for Ruby on Rails, providing bindings to the MySQL client library and offering faster, more stable integration than the older mysql gem. 

Setup involves adding it to your Gemfile, running bundle install, and configuring database.yml.

Alternatives include pg for PostgreSQL or sqlite3 for lightweight development.
Visit mysql2 Contact for help and advice
  • Ruby on Rails Official Guides
    Canonical official guides for learning and reference across all Rails features.
  • pgvector
    Enable semantic search and embeddings in Rails using PostgreSQL with pgvector.
  • pghero
    Monitor PostgreSQL performance in Rails with PgHero’s built-in dashboard.
  • pg
    Use PostgreSQL with Rails via the pg gem, the standard adapter.
  • activerecord-import
    Speed up bulk inserts in Rails with activerecord-import.
Databases & ActiveRecord
RAILS PORTAL

All things Ruby on Rails, in one place.

Newsletter

Get practical Rails tips, must-know gems, and new posts straight to your inbox. 1-2 emails per month. No fluff.

© 2025 RAILS PORTAL. All rights reserved.
Privacy Terms Contact