Interacting with a MySQL database

aaron wrote:

Virgil Tual wrote:
> Sorry, might help if I add the error messgae:
>
> Mysql::Error in BlogController#index
>
> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
>
> RAILS_ROOT: /Users/chris/Ruby/Blog/public/../config/..

i had the same problem
i don't know why but the only socet file i found on my mac was
mysql-vcw.sock

so i just changed my database yml to include

socket: /tmp/mysql-vcw.sock

--
Posted via http://www.ruby-forum.com/.

as written in original post he is running MAMP and MAMP will only be in
one location: /Application/MAMP
so the socks file also must be there. in my case it is under
/Applications/MAMP/tmp/mysql. so I added the following line to
database.yml and it woks:
socket: /Applications/MAMP/tmp/mysql/mysql.sock

hope this helps
Fritzek