How to enable INNODB to work with mysql 5.xx?

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
As the my.cnf file is different from the previous version, and with innodb enabled by default in mysql 5.xx, how can i be sure it really works?

I tried installing ORANGEHRM and it says

MySQL InnoDB Support Not Available

any clue?
Just remove any disable options for innodb in /etc/my.cnf (and restart mysql)
 

shadowspid

Active Member
Nov 28, 2002
31
2
158
As the my.cnf file is different from the previous version, and with innodb enabled by default in mysql 5.xx, how can i be sure it really works?

I tried installing ORANGEHRM and it says

MySQL InnoDB Support Not Available

any clue?
 

Attachments

shadowspid

Active Member
Nov 28, 2002
31
2
158
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
old-passwords = 1
 

kazar

Active Member
May 18, 2008
27
0
51
NYC/Earth
cPanel Access Level
Root Administrator
same problem here

I am administering a domain using cpanel 11 on a CentOS VPS and am experiencing the very same frustrating problem.

If I log into the server's shell as root and run # locate, my.cnf turns up only one instance on my multi-domain vps, at /etc/my.cnf. Here's the contents of the file:

# cat /etc/my.cnf
[mysqld]
socket = /var/lib/mysql/mysql.sock
set-variable = max_connections=500
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = innodb1:100M;innodb2:100M:autoextend
default-table-type=innodb



Yet, "show engines;" in mysql shows this:

+------------+----------+----------------------------------------------------------------+
| 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 | NO | Supports transactions and page-level locking |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | YES | 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 in phpmyadmin innodb (among other engines) is greyed out and MyISAM is shown as default.

For some apps (Xplanner, for instance) InnoDB is required, and as a db pro I really don't like MyISAM.

What am I missing? Why is cpanel/phpmyadmin not respecting the setting in my.cnf?

Thanks,

kazar
 

kazar

Active Member
May 18, 2008
27
0
51
NYC/Earth
cPanel Access Level
Root Administrator
re my post just above, based on some web research (I'm sure it's obvious I don't know much about mySQL) I changed my.cnf to:

[mysqld]
socket = /var/lib/mysql/mysql.sock
set-variable = max_connections=500
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = innodb1:100M;innodb2:100M:autoextend
default-storage_engine=InnoDB


... and restarted the MySQL service (using WHM). But it would not start up. I had to comment out those last 3 lines and restart it again to get the service going.

Why is my server allergic to InnoDB?

kazar
 

keddie

Well-Known Member
Nov 17, 2007
50
0
56
A very timely thread, I also need to enable Innodb, if anyone has any success with this in a WHM environment, please post here.

Al
 

sneader

Well-Known Member
Aug 21, 2003
1,195
65
178
La Crosse, WI
cPanel Access Level
Root Administrator
For my particular problem, it turned out that InnoDB was already broken, but something was borked up!

I was seeing this in the /var/lib/myswl/servername.err log:

InnoDB: Error: log file ./ib_logfile1 is of different size 0 10485760 bytes

The solution was to move the ib* files out of the way and let them get recreated:

cd /var/lib/mysql
mkdir /home/temp/
mv ib* /home/temp
/etc/init.d/mysql restart

We tried to move just the file listed in the error, but that wasn't enough. Doing all of them got us going straight out.

Hope this helps someone.

- Scott
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
Hi,

Just remove any disable options for innodb in /etc/my.cnf and restart mysql: