ryanb / railscasts

railscasts.com in open source (outdated).
http://railscasts.com
MIT License
760 stars 174 forks source link

Can't connect to local MySQL server through socket #58

Open al-codaio opened 12 years ago

al-codaio commented 12 years ago

I am also running into a script/setup error which is not related to: https://github.com/ryanb/railscasts/issues/34

The mysql2 gem installs fine and when I run script/setup I run into this error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"railscasts_development", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost"}, charset: , collation: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"railscasts_test", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost"}, charset: , collation: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"railscasts_production", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost"}, charset: , collation:

I'm using Ubuntu 12.04 and RVM and don't even see a /var/run/mysqld folder. Has anyone else run into this issue?