rake aborted! No such file or directory - /tmp/mysql.sock
Posted by Ryan Baxter Sat, 06 Oct 2007 20:40:00 GMT
If you’re running into the above error message when trying to perform a Rails migration on Debian or Ubuntu then you might try adding the following line to your database.yml file:
socket: /var/run/mysqld/mysqld.sockMy database.yml file looks sorta like this:
development:
database: crunchlife_development
adapter: mysql
host: localhost
username: mysql_user
password: @!#?@!
socket: /var/run/mysqld/mysqld.sock
test:
database: crunchlife_test
adapter: mysql
host: mysql.ryanbaxter.net
username: mysql_user
password: @!#?@!
socket: /var/run/mysqld/mysqld.sock
production:
database: crunchlife_production
adapter: mysql
host: mysql.ryanbaxter.net
username: mysql_user
password: @!#?@!Good luck and happy migrations!
- Meta 12 comments, permalink, rss, atom


sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sockI think that's a little DRYer solution to modifying each entry in your db.yml
Jannie - Welkom!