# dev-db/mysql-5.0.26-r2 and innodb

## questionaire

hi there,

its unbelievable how hard it can be to find out that i'm not able to find how to add innodb support to my mysql database. no useflag avaible, starting with --innodb param doesnt work neither.

do you have anyideas?

version of mysql is  dev-db/mysql-5.0.26-r2

----------

## Dan

# cat /usr/portage/profiles/use.desc|grep innodb

innodb - Adds innodb support for mySQL (transaction support)

and

# euse -i innodb

global use flags (searching: innodb)

************************************************************

[+ C  ] innodb - Adds innodb support for mySQL (transaction support)

local use flags (searching: innodb)

Don't forget to remove the skip-innodb from the /etc/mysql/my.cnf configuration file. Change the databases to InnoDB tables like 

ALTER TABLE data TYPE=InnoDB;

----------

## questionaire

using the cmd:

emerge -avD =dev-db/mysql-5.0.26-r2

doesnt show a possible useflag called innodb! i already added that to my make.conf as global useflag und skip-innodb is commented out in my my.cnf!

phpMyAdmin also points out, that innodb is deactivated - or better to say: not available

----------

## Dan

mysql-3.23.58-r1 : 'innodb' flag enables InnoDB support

mysql-4.0.25-r2 through mysql-5.0.X include InnoDB support by default. 

After 5.1 this was again made dependent on flag 'innodb'.

This comes from the manual so........ RTFM  :Smile:  hehe

http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

----------

## questionaire

and why does it drop me an error like:

#1286 - Unknown table engine 'InnoDB'

when i try the sql command: SET storage_engine=InnoDB;

btw i tried all kinds of innodb ... INNODB, innodb, InnoDB

----------

## Dan

what does 

```
show engines;
```

 show you?

mine =

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2 to server version: 5.0.26-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show engines;

+------------+----------+----------------------------------------------------------------+

| Engine     | Support  | Comment                                                        |

+------------+----------+----------------------------------------------------------------+

| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         | 

| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      | 

| InnoDB     | YES      | Supports transactions, row-level locking, and foreign keys     | 

| BerkeleyDB | YES      | Supports transactions and page-level locking                   | 

| BLACKHOLE  | YES      | /dev/null storage engine (anything you write to it disappears) | 

| EXAMPLE    | NO       | Example storage engine                                         | 

| ARCHIVE    | YES      | Archive storage engine                                         | 

| CSV        | YES      | CSV storage engine                                             | 

| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables                 | 

| FEDERATED  | YES      | Federated MySQL storage engine                                 | 

| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          | 

| ISAM       | NO       | Obsolete storage engine                                        | 

+------------+----------+----------------------------------------------------------------+

12 rows in set (0.06 sec)

----------

## Dan

also you could test and check /usr/share/mysql/mysql-test/var/log/master.err

lookie here........ http://bugs.mysql.com/bug.php?id=16691

----------

## questionaire

mysql> show engines;

+------------+----------+----------------------------------------------------------------+

| Engine     | Support  | Comment                                                        |

+------------+----------+----------------------------------------------------------------+

| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         | 

| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      | 

| InnoDB     | DISABLED | Supports transactions, row-level locking, and foreign keys     | 

| BerkeleyDB | YES      | Supports transactions and page-level locking                   | 

| BLACKHOLE  | YES      | /dev/null storage engine (anything you write to it disappears) | 

| EXAMPLE    | NO       | Example storage engine                                         | 

| ARCHIVE    | YES      | Archive storage engine                                         | 

| CSV        | YES      | CSV storage engine                                             | 

| ndbcluster | NO       | Clustered, fault-tolerant, memory-based tables                 | 

| FEDERATED  | YES      | Federated MySQL storage engine                                 | 

| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          | 

| ISAM       | NO       | Obsolete storage engine                                        | 

+------------+----------+----------------------------------------------------------------+

12 rows in set (0.00 sec)

edit: that bugreport only discribes that those tests are made with --skip-innodb, not really my problem, or?

----------

## questionaire

on my second server there is mysql-5.0.30 running ... InnoDB works

now i upgraded on the second server to mysql-5.0.32 because 5.0.30 doesnt seem to be in the portage.

still same problem  :Sad: 

----------

## Dan

| InnoDB | DISABLED | Supports transactions, row-level locking, and foreign keys | 

thats your problem

fix your configuration and restart mysqld

----------

## servermonk

I have the same problem with my new emerge of dev-db/mysql-5.0.32. 

show engines states:

```

mysql> show engines;

+------------+----------+----------------------------------------------------------------+

| Engine     | Support  | Comment                                                        |

+------------+----------+----------------------------------------------------------------+

| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         | 

| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      | 

| InnoDB     | DISABLED | Supports transactions, row-level locking, and foreign keys     | 

| BerkeleyDB | YES      | Supports transactions and page-level locking                   | 

| BLACKHOLE  | NO       | /dev/null storage engine (anything you write to it disappears) | 

| EXAMPLE    | NO       | Example storage engine                                         | 

| ARCHIVE    | NO       | Archive storage engine                                         | 

| CSV        | NO       | CSV storage engine                                             | 

| ndbcluster | NO       | Clustered, fault-tolerant, memory-based tables                 | 

| FEDERATED  | NO       | Federated MySQL storage engine                                 | 

| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          | 

| ISAM       | NO       | Obsolete storage engine                                        | 

+------------+----------+----------------------------------------------------------------+

12 rows in set (0.00 sec)

```

Even though innodb is in my make.conf and my /etc/mysql/my.cnf file has the "skip-innodb" line removed. Is there something in the config file I'm missing to enable innodb?

----------

## Dan

I have two different versions installed on different machines.

```
Your MySQL connection id is 2 to server version: 5.0.26-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show engines;

+------------+----------+----------------------------------------------------------------+

| Engine     | Support  | Comment                                                        |

+------------+----------+----------------------------------------------------------------+

| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         | 

| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      | 

| InnoDB     | YES      | Supports transactions, row-level locking, and foreign keys     | 

| BerkeleyDB | YES      | Supports transactions and page-level locking                   | 

| BLACKHOLE  | YES      | /dev/null storage engine (anything you write to it disappears) | 

| EXAMPLE    | NO       | Example storage engine                                         | 

| ARCHIVE    | YES      | Archive storage engine                                         | 

| CSV        | YES      | CSV storage engine                                             | 

| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables                 | 

| FEDERATED  | YES      | Federated MySQL storage engine                                 | 

| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          | 

| ISAM       | NO       | Obsolete storage engine    
```

and 

```
Server version: 5.0.34-log Gentoo Linux mysql-5.0.34

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show engines;

+------------+----------+----------------------------------------------------------------+

| Engine     | Support  | Comment                                                        |

+------------+----------+----------------------------------------------------------------+

| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         | 

| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      | 

| InnoDB     | YES      | Supports transactions, row-level locking, and foreign keys     | 

| BerkeleyDB | YES      | Supports transactions and page-level locking                   | 

| BLACKHOLE  | YES      | /dev/null storage engine (anything you write to it disappears) | 

| EXAMPLE    | NO       | Example storage engine                                         | 

| ARCHIVE    | YES      | Archive storage engine                                         | 

| CSV        | YES      | CSV storage engine                                             | 

| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables                 | 

| FEDERATED  | YES      | Federated MySQL storage engine                                 | 

| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          | 

| ISAM       | NO       | Obsolete storage engine 
```

neither of them use the innodb USE flag but innodb works fine.

```
[I] dev-db/mysql

     Available versions:  [M]3.23.58-r1 4.0.27-r1 4.1.22-r1 [M]~4.1.23_alpha20070101-r61 5.0.26-r2 ~5.0.32 ~5.0.34

     Installed versions:  5.0.26-r2(03:55:14 PM 01/05/2007)(berkdb big-tables cluster -debug -embedded extraengine -latin1 -max-idx-128 -minimal perl -selinux ssl -static)

     Homepage:            http://www.mysql.com/

     Description:         A fast, multi-threaded, multi-user SQL database server.

```

```
[I] dev-db/mysql

     Available versions:  [M]3.23.58-r1 4.0.27-r1 4.1.22-r1 [M](~)4.1.23_alpha20070101-r61 5.0.26-r2 [m](~)5.0.32 (~)5.0.34

     Installed versions:  5.0.34(04:31:21 PM 03/06/2007)(berkdb big-tables cluster -debug -embedded extraengine -latin1 -max-idx-128 -minimal perl -selinux ssl -static)

     Homepage:            http://www.mysql.com/

     Description:         A fast, multi-threaded, multi-user SQL database server.
```

----------

## Vlad

Was any of this stuff resolved?  I have set the innodb use flag, deleted any and all skip-innodb lines from the /etc/mysql/my.cnf file, and recompiled 3 times, and show engines STILL says innodb is DISABLED.  This **** is really pissing me off...any ideas?

----------

## dopt

dunno whether it'll help or be of any use 'cause this topic is quite old now, but anyway. i resolved this problem by unmerging mysql, deleting /var/lib/mysql and /var/log/mysql directories and emerging mysql again. actually i found this in gentoo docs.

----------

## bobcatt

Hello

I have experienced the same problem.

Complilation was ok, support is present but disabled at startup.

/etc/mysql/my.cnf seemed to be ok (no "skip-innodb" line)

After an upgrade,i've changed innoDB params (don't remember exactly hich one...) and after startup i had the following lines in the logs:

```
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes

InnoDB: than specified in the .cnf file 0 10485760 bytes!

070828 12:20:32 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.0.44-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-5.0.44
```

I didn't paid attention to this... But, this cause an error in InnoDB engine and disable it at startup.

To correct the problem (hope this will works for evryone).

```
/etc/init.d/mysql stop

cd /var/lib/mysql/

mkdir /tmp/sql

mv ib_logfile* /tmp/sql

/etc/init.d/mysql start
```

At the first startup, mysql told me there was a crash and recovery was needed. At the second startup, every thing was ok.

----------

