I added the line 'skip_innodb' in my.cnf file to disable innodb and restarted the mysqld. But,It is not effecting in database. Is there any alternative solutions ?
5 Answers
If you are using MySql 5.5 or above,
ignore-builtin-innodb
and
default-storage-engine = myisam
under
[mysqld]
in /etc/my.cnf
-
I got this error - Fatal error in defaults handling. Program aborted error: Found option without preceding group in config file: /etc/my.cnf at line: 1 Aug 2, 2012 at 7:32
-
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 [mysqld_safe] ignore-builtin-innodb default-storage-engine = myisam log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid Aug 2, 2012 at 7:38
-
[Warning] ignore-builtin-innodb is deprecated and will be removed in future releases.
– KCDApr 19, 2013 at 1:47 -
6As of MySQL 5.5 and above, instead of using
ignore-builtin-innodb
, use eitherinnodb=OFF
orskip-innodb
and then follow it withdefault-storage-engine = myisam
. See: MySQL manual and Todd's MySQL Blog May 3, 2013 at 2:46 -
Add skip-innodb
under [mysqld]
in my.cnf
and then restart
the MySQL server
See mysql log file for the success using tail -100 log_file_name_with_full_path
Verify using following query:
SHOW ENGINES;
-
See the below lines which is in my.cnf.But It is not working. [mysqld_safe] default-storage-engine = MYISAM skip-innodb. Show engines query shows that innodb is 'YES' Aug 2, 2012 at 7:18
-
1
Try
innodb=OFF
default-storage-engine=MyISAM
MyISAM is just a example you can choose wathever you want there You can read more here http://www.webhostingtalk.com/showthread.php?t=1052143
For mysql 5.6+
Iv'e had difficulties trying the apply the other answers.
This is what i found best with mysql 5.6.19
1) edit /etc/mysql/my.cnf
-- IMPORTANT - place these values under [mysqld]
# ... other settings
[mysqld]
innodb=OFF
loose-innodb-trx=0
loose-innodb-locks=0
loose-innodb-lock-waits=0
loose-innodb-cmp=0
loose-innodb-cmp-per-index=0
loose-innodb-cmp-per-index-reset=0
loose-innodb-cmp-reset=0
loose-innodb-cmpmem=0
loose-innodb-cmpmem-reset=0
loose-innodb-buffer-page=0
loose-innodb-buffer-page-lru=0
loose-innodb-buffer-pool-stats=0
loose-innodb-metrics=0
loose-innodb-ft-default-stopword=0
loose-innodb-ft-inserted=0
loose-innodb-ft-deleted=0
loose-innodb-ft-being-deleted=0
loose-innodb-ft-config=0
loose-innodb-ft-index-cache=0
loose-innodb-ft-index-table=0
loose-innodb-sys-tables=0
loose-innodb-sys-tablestats=0
loose-innodb-sys-indexes=0
loose-innodb-sys-columns=0
loose-innodb-sys-fields=0
loose-innodb-sys-foreign=0
loose-innodb-sys-foreign-cols=0
default-storage-engine=MyISAM
default_tmp_storage_engine=MyISAM
# ...
2) restart mysql
sudo service mysql restart
Source: MySQL docs - 14.1.3 Turning Off InnoDB
What about migration?
if you want to migrate your existing database from InnoDB
to MyISAM
, the above as-is does not effect existing tables (and will give you runtime errors).
Solution
there is a utility called mysqldump
uses store the existing database tables + data into file (SQL script)
1) backup
mysqldump -u [user] -p[pass] [database name] > /tmp/backup.sql
2) change /etc/mysql/my.cnf
as shown above
nano /etc/mysql/my.cnf
# ...
[mysqld]
innodb=OFF
loose-innodb-trx=0
loose-innodb-locks=0
# ...
3) restart mysql
sudo service mysql restart
4) reload data from 1st step
mysql -u [user] -p[pass] [database name] < /tmp/backup.sql
In MySQL 5.5+ the required configuration fragment would be as follows
[mysqld]
skip-innodb
default-storage-engine = myisam