Installation problem - Lost connection to MySQL server

New to Ruby, having trouble installing/configuring Radiant.

Windows XP, Apache 1.3.31, MySQL 4.1.11, connecting to DB server on
local network.

I have added host: to the database.yml.

This is what happens when I try to run the database set up.

C:\ruby\lib\ruby\gems\1.8\gems\radiant-0.5.0>ruby script/setup_database
production
Run setup_database --help for information on additional options.

Loading production environment…OK

WARNING! This script will overwrite information currently stored in the
database “radiant_live”. Are you sure you want to continue? [Yn] y

Creating tables…
– drop_table(“config”)
– create_table(“config”, {:force=>true})
FAILED
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_
adapters/abstract_adapter.rb:120:in log': Mysql::Error: Lost connection to MySQ L server during query: CREATE TABLE config (idint(11) DEFAULT NULL auto_incre ment PRIMARY KEY,keyvarchar(40) DEFAULT '' NOT NULL,valuevarchar(255) DE FAULT '') ENGINE=InnoDB (ActiveRecord::StatementInvalid) from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor d/connection_adapters/mysql_adapter.rb:185:inexecute’
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/connection_adapters/abstract/schema_statements.rb:104:in
create_table' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor d/connection_adapters/mysql_adapter.rb:298:increate_table’
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/migration.rb:272:in send' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor d/migration.rb:272:inmethod_missing’
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/migration.rb:270:in say_with_time' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor d/migration.rb:256:inmeasure’
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/migration.rb:256:in say_with_time' ... 7 levels... from script/setup_database:99:increate_tables’
from script/setup_database:19:in run' from script/setup_database:9:inrun’
from script/setup_database:297

Thanks
-Andrew

Andrew wrote:

Creating tables…
– drop_table(“config”)
– create_table(“config”, {:force=>true})
FAILED

. . .

Yah, something is not quite right. Try this:

% script/console production
Loading production environment.

Radiant::Config[‘test’] = true
=> true
Radiant::Config[‘test’]
=> “1”

If you run into the same problem it indicates that something is wrong
with your Rails setup. At that point I’d suggest that you ask the same
question on the Rails list to see if anyone else has had a similar
problem. See also:

http://wiki.rubyonrails.org/rails/pages/Mysql+Connection+Problems


John L.
http://wiseheartdesign.com

Thanks for the reply John,

Finally got it all working.

Best regards,
Andrew

John W. Long wrote:

For people searching this list with the same problem in the future,
could you write up a brief description of what was actually wrong and
how you fixed it?

These are the steps that I took after reading John’s reply:

First I ran this: gem install mysql

Then I downloaded this MySQL adapter for windows:
http://www.vandomburg.net/pages/mysql-ruby-windows

Extracted the mysql.so to: C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt

Then copied the libmysql.dll from my PHP installation to the Ruby bin:
C:\ruby\bin

After that everything worked fine. Hope that helps out some of the
Windows users.

Andrew wrote:

Thanks for the reply John,

Finally got it all working.

For people searching this list with the same problem in the future,
could you write up a brief description of what was actually wrong and
how you fixed it?


John L.
http://wiseheartdesign.com