0

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:

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I've tried to leave blank password in database.yaml and it didn't help. I think it's trouble in reconfiguration. How I can delete ALL from last MySQL, I uninstall it and deleted folder MySQL, but when I installing and configuring again, it says, that it is already configured and gives me error
0

hi same situation is here with me but it can be sought out by Services you just have to restart MySQL option again

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.