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

47 views
Skip to first unread message

Ecoder 108

unread,
Jan 5, 2016, 4:03:00 AM1/5/16
to rubyonra...@googlegroups.com
Hello Guys,

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,

Attachments:
http://www.ruby-forum.com/attachment/11203/redmine-on-browser.jpg
http://www.ruby-forum.com/attachment/11204/redmine-on-browser.jpg


--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Jan 5, 2016, 5:46:50 AM1/5/16
to Ruby on Rails: Talk
On 5 January 2016 at 09:01, Ecoder 108 <li...@ruby-forum.com> wrote:
> Hello Guys,
>
> 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

Ecoder 108

unread,
Jan 5, 2016, 9:11:14 AM1/5/16
to rubyonra...@googlegroups.com
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,

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

Colin Law

unread,
Jan 5, 2016, 10:07:31 AM1/5/16
to Ruby on Rails: Talk
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
Reply all
Reply to author
Forward
0 new messages