Hi!
I am newer to here & to Ruby generally.
But have got a problem while trying to set up Ruby, Rails & MySQL.
Installed Ruby
Installed Rails
Installed RadRails
In RadRails created Rails project ‘test’. While creating, checked
boxes:
Generate Rails application sceleton
Create a WEBrick server
In RadRails generated ‘mycontroller’ controller. While was creating
it, got a
message in Console “./script/…/config/boot.rb:29:Warning:
require_gem is
obsolete. Use gem instead.”. But creating was successfull.
In RadRails generated ‘mymodel’ model. Got the same message in
Console. But
creating was successfull as well.
Edited mycontroller_controller.rb:
“class MycontrollerController < ApplicationController
def index
render_text “My Controller is working”
end
end”.
Checked by http://localhost:3000/mycontroller. Working!
Installed MySQL. While was installing checked ‘off’ the box with
login & pass requiremts of the server. When started MySQL Command Line
client, it asks for the password
Installed HeidiSQL.
While WEBrick server is running on port 3000, was trying to connect
by HeidiSQL to:
hostname: localhost
user: root
password:
port: 3306
…and got an SQL Error: “Can’t connect to MySQL server on ‘localhost’
(10061)”
Can’t understand where my problem is. Could somebody possibly advice me
what to do?
thx for the answer!
when I start MySQL command line shell. It says: “Enter password:”.
when I try by command line:
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysql -uroot -p
Enter password:
I push ‘enter’.
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysql -uroot -p
Enter password:
I push ‘enter’.
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)–
Posted viahttp://www.ruby-forum.com/.
In addition the mysql command line client, there is a mysql Windows
service that needs to be running that the command-line tool is going to
try to connect to.
Usually, the MySQL installer asks you if you want to start the service
automatically, but perhaps this was missed. Check your Windows
services in the control panel and make sure that a “MySQL” service has
been started. If it’s not even listed, then something went haywire
during the install.
In addition the mysql command line client, there is a mysql Windows
service that needs to be running that the command-line tool is going to
try to connect to.
Usually, the MySQL installer asks you if you want to start the service
automatically, but perhaps this was missed. Check your Windows
services in the control panel and make sure that a “MySQL” service has
been started. If it’s not even listed, then something went haywire
during the install.
Thank you for the answer.
I suppose it doesnt even start.
When configuring MySQL Server 4.1 it says:
Prepare configuration
Write configuration file
X Start service
The service could not be started. Error:0
And the same: can’t do anything :((
Don’t know what to do…
Do you still have HeidiSQL running? Does it run on port 3306 too? If
so, shut down HeidiSQL and try starting MySQL from the Services
control panel. Sometimes the installer just fails at starting up the
server, but if you go into the Services control panel you can
sometimes start it up manually yourself (and then it should work every
time you boot from that time on).
You could also try navigating a command prompt to your MySQL
installation directory, and into the /bin/ dir and there try to run
mysqld.exe, this may or may not occupy that command prompt for as long
as you want the server running and may not give you any output. I’ve
been running MySQL like that a while not too long ago (when I didn’t
want it as a service).
Do you still have HeidiSQL running? Does it run on port 3306 too? If
shut down HeidiSQL and try starting MySQL from the Services
control panel.
Doesnt’ help. When I try to start MySQL from Services there is an error
message:
“Could not start the MySQL server on Local Computer.
Error 1067: The process terminated unexpectedly”
I think I basically uninstalled MySQL, rebooted my Windows box, then
re-installed
Tried few times to do so. Doesn’t help.
The service could not be started. Error:0And the same: can’t do anything :((
Don’t know what to do…
I remember having this problem once a while back… I think I basically
uninstalled MySQL, rebooted my Windows box, then re-installed. I’m not
100% sure that cured it, but it’s worth a try, even though I know it
sounds illogical.
There may also my a more detailed mysql log file somewhere on your hard
drive, though I’m not exactly sure where it would be.
Thanks to all! Its working now! But only with password…
I have reinstalled MySQL totally, restarted PC. Installed again MySQL.
Entered password. And it works now but only with password.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.