If you are one of those n00bs that are looking to learn Ruby on Rails on a Mac OS X and happen to use the unfortunate combination of Locomotive and a XAMPP-based MySQL server, you will probably be frustrated with the following error,
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
The secret sauce to solve this problem is to connect to your MySQL using an IP address (to force TCP/IP) rather than the default socket-based connection initiated by using localhost.
Simply change the following line in your Rails config/database.yml from,
host: localhost
to
host: 127.0.0.1
Category Archive
-
- Add-ons3 posts
- api8 posts
- Design Discussion2 posts
- Events3 posts
- fixx28 posts
- fixx hacks4 posts
- General32 posts
- Hog Camp1 posts
- ISV1 posts
- Links4 posts
- News25 posts
- Opinion1 posts
- Product Updates2 posts
- Rails Plugins1 posts
- Rants8 posts
- solomon5 posts
- Tech Tips9 posts