tags:

views:

1361

answers:

1

I am attempting to remotely connect to a MySQL database using ruby on rails.

In my database.yml:

development:
 adapter: mysql
 database: peer
 host: host
 port: 3306
 username: root
 password: password

I then go to do a rake db:migrate and get this error

Mysql::Error: The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it working: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB

Now after some searching, I found that this was an error on Windows Servers with MySQL and I needed to go into the my.ini file and comment out skip-innodb. When I went to do that however, that line wasn't in that file but in a different one named "my-innodb-heavy-4g.ini"

I found the command in the line, but it was already commented out. And now I am at a loss on what to do next.

This application is going to be connected to multiple databases as well, I just wanted to see if I could connect to the remote one first.

+1  A: 

Stop MySQL, rename my.ini to something else, rename "my-innodb-heavy-4g.ini" to my.ini, restart MySQL. Assuming, of course, that your MySQL server was built with InnoDB in the first place.

Edit: it appears that the OP is using a server deliberately built without InnoDB support. See e.g. here, a 5.0 reference manual, under section "2.3.2. Enterprise Server Distribution Types":

  • This section does not apply to MySQL Community Server users.

    ...

    mysql-classic: Released under a commercial license, does not include InnoDB.

...and the poster now says their server is indeed a 5.0 "mysql-classic".

So, it appears that the only way to use InnoDB under these conditions is to upgrade the server to something more functional (and ideally a bit more recent, but that's no big deal).

Alex Martelli
Tried this, didn't work. I couldn't restart the service after I renamed the file. I also added the InnoDB commands into the my.ini file and got an error when trying to start the service with the new commands as well.
Ryan
Looks like you may have a MySQL binary that was built without any support for InnoDB -- exactly what version is it and where did you get it from?
Alex Martelli
Server Info:MySQL 5.0.58-classic-nt-log via TCP/IPClient Info:MySQL Client Version 5.1.11Unfortunately I can't tell you where I got it from. It's the company database and my boss isn't in today.
Ryan
The 5.whatever numbers are fine, InnoDB has been in from well before then; and the client is not relevant. Your problem is w/your specific server build, let me edit my answer accordingly.
Alex Martelli
That was it! Thanks for all your help. We were able to upgrade without any problems.
Ryan
@Ryan, glad I helped! So what about an accept?-)
Alex Martelli