Error: 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
'/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
'/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]$

That says you are trying to connect as user root with no password. Is
that what you intended? If not have you got the correct user and pwd
in config/database.yml?

Colin

Thank You @colin

But how can i change that and where can i find config/database.yml file?

Please remember to quote the previous message when replying, otherwise
no-one knows what you are referring to. This is a mailing list not a
forum, though you may be accessing it via a forum-like interface.
Thanks.

It is in the config folder in your rails application.
Since you did not know that I suggest that you work right through a
good tutorial such as railstutorial.org (which is free to use online).
That will show you the basics of rails.

Colin

Colin Law wrote in post #1183468:

As I thought, you have specified root and no password as the default,
and used that for development. I suggest working through the
tutorial, it will save you a lot of time.

Colin

Colin Law wrote in post #1183472:

which tutorial?

Yes, in there you have specified user root with no password, which I
presume is not what you intended.
To fix it you must use a valid user/pwd for your mysql server.

Colin

which tutorial?

The one in my second (I think) post.

Colin