When i try to run the command rake db:create:all it’s giving the following error:
rake db:create
Can't connect to MySQL server on 'localhost' (10061)
Couldn't create database for {"adapter"=>"mysql2", "database"=>"db/test", "username"=>"root", "password"=>nil, "host"=>"localhost", "pool"=>5, "timeout"=>5000}, charset: , collation:
Can't connect to MySQL server on 'localhost' (10061)
Couldn't create database for {"adapter"=>"mysql2", "database"=>"db/development", "username"=>"root", "password"=>nil, "host"=>"localhost", "pool"=>5, "timeout"=>5000}, charset: , collation:
Is the information in config/database.yml correct? The “db/test” and “db/development” look suspicious for database names.
And never use root access in your programs, even in testing. Go through the effort to create SQL users and GRANT appropriate access capabilities.