Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't connect to local MySQL server through socket

Hi I am a new fedora user and i am installing ROR on my machine. but when i try to enter the following command, it shows the following errors.can any one please tell me how can i solve this problem.

[smehsan@localhost proone]$ rake db:create

<mysql2::error: can't="" connect="" to="" local="" mysql="" server="" through="" socket<="" h1="">

'/var/run/mysqld/mysqld.sock' (13 "Permission denied")> Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock", "database"=>"proone_development"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"} (If you set the charset manually, make sure you have a matching collation)

<mysql2::error: can't="" connect="" to="" local="" mysql="" server="" through="" socket<="" h1="">

'/var/run/mysqld/mysqld.sock' (13 "Permission denied")> Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock", "database"=>"proone_test"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"} (If you set the charset manually, make sure you have a matching collation) [smehsan@localhost proone]$