0
votes

I had problem with connection to database in my Rails application, so reinstalled everything according to this tutorial, and it doesn't help.

Now when I'm running the installation of MySql Server it says:

error 1045 Access denied for 'root@localhost'(using password NO)

When I was reconfiguring leaved the field old password empty. How I can solve this ? Here is my log:

Can't connect to MySQL server on 'localhost' (10061)

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"testapp_development", "pool"=>5, "username"=>"root", "password"=>"root", "host"=>"localhost"}, charset: , collation: Can't connect to MySQL server on 'localhost' (10061)

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"testapp_test", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost"}, charset: , collation:

1

1 Answers

0
votes

You mentioned that you left your password empty when you installed MySQL? But your Rails seems to be trying to connect with the password 'root'. Which is it? If your MySQL has a password, you need to use it to connect, and if it doesn't, you mustn't send one.