Can't connect to MySQL server on 'localhost' (111) (Mysql2::Error)

Hello G.s,

I am a newbe on Ruby on Rails. I love Redmine so I have just installed
Redmine on BlueHost, Everything is ok except when starting with browser
it shows “Can’t connect to MySQL server on ‘localhost’ (111)
(Mysql2::Error)”.

I have spent for many hours on forums however I am not lucky. Please
share to me if you experienced I appreciate all of you.

Thank you,

On 5 January 2016 at 09:01, Ecoder 108 [email protected] wrote:

Hello G.s,

I am a newbe on Ruby on Rails. I love Redmine so I have just installed
Redmine on BlueHost, Everything is ok except when starting with browser
it shows “Can’t connect to MySQL server on ‘localhost’ (111)
(Mysql2::Error)”.

I have spent for many hours on forums however I am not lucky. Please
share to me if you experienced I appreciate all of you.

It is generally best to look in log/development.log for errors, or
alternatively in the server window. That way you can copy/paste the
relevant section here. It is then much easier for us to look at the
log and work out what is going wrong.

First though, what happens if you run
rake db:migrate

Colin

Thanks Colin,

Currently, when I run “# rake db:migrate”, nothing happen. It is done
normal.

I will be pasting more information for the issue as below:

  1. I followed the bluehost’s document at:
    https://my.bluehost.com/cgi/help/redmine
  2. rails generate controller First list

    identical app/controllers/first_controller.rb
    route get ‘first/list’
    invoke erb
    exist app/views/first
    identical app/views/first/list.html.erb
    invoke test_unit
    identical test/controllers/first_controller_test.rb
    invoke helper
    identical app/helpers/first_helper.rb
    invoke test_unit
    invoke assets
    invoke js
    identical app/assets/javascripts/first.js
    invoke css
    identical app/assets/stylesheets/first.css
  3. I also attached development.log and production.log

Thanks,

On 5 January 2016 at 14:10, Ecoder 108 [email protected] wrote:

identical app/controllers/first_controller.rb
invoke js
identical app/assets/javascripts/first.js
invoke css
identical app/assets/stylesheets/first.css
3. I also attached development.log and production.log

Thanks,

Attachments:
http://www.ruby-forum.com/attachment/11209/production.log
http://www.ruby-forum.com/attachment/11210/development.log

I meant to copy/paste the section of the log showing the error, not
just attach the whole log. By doing that you are asking me to
download it and pour over it looking for the error.

In this case the server window output is probably better. Start the
server then attempt to open the page from the browser. You should see
the error in the server window. Then copy/paste the complete output
from the server window, from starting the server to the error.

Also which versions of ruby (ruby -v) and rails (rails -v) are you
using, and on which operating system.

Colin