Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby ActiveRecord Basics Migrations and Relationships Migrations

Matt Young
Matt Young
6,348 Points

rake db:create error

Everything has worked fine up until rake db: create, which returns the following error:

biller>rake db:create DL is deprecated, please use Fiddle

<Mysql2::Error: Can't connect to MySQL server on 'localhost' (10061)>

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5 , "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"biller_ 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 MySQL server on 'localhost' (10061)>

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5 , "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"biller_ test"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"} (If you set the charset manually, make sure you have a matching collation)

\biller>

Assistance appreciated!

3 Answers

Matt Young
Matt Young
6,348 Points

Yes, you're right. The following is just a warning: biller>rake db:create DL is deprecated, please use Fiddle

HOWEVER, I do believe the rest is an error. That is, all the stuff beginning with: Couldn't create database.

Hi Matt,

It is clearly not error message, just warning you about deprecation.

To comment out that message or remove it totally, let's find ---> C:\Ruby200\lib\ruby\2.0.0\dl.rb or search "dl.rb" in your c: drive inside Ruby library folders.

Matt Young
Matt Young
6,348 Points

Installed mysql. Now working!