开发者

How to set the default storage engine to InnoDB in XAMPP

How do I set the default-storage-engine to InnoDB开发者_高级运维 in Linux XAMPP 1.7.3?


The easiest way is just to go to the mysql config file (my.ini in windows, my.cnf in Linux) and just add this:

[mysqld]
default-storage-engine=InnoDB

This assumes that you have enabled InnoDB, which is another topic, but there are plenty of answers on how to do this. You can always check the default storage engine in phpMyAdmin on XAMPP: Just click on the server, then on engines, then on a particular engine (like MyISAM), and then see if it says MyISAM is the default storage engine on this MySQL server.


You set the default storage engine in the MySQL configuration, but that will only apply to tables that are created after that point. You'll need to alter any tables that aren't InnoDB manually like this. If you have lots of data, this can take a while because it will create the new table, insert all the records and then drop the old table leaving this one in it's place.

ALTER TABLE table_name ENGINE = INNODB;


if you are trying to change the default storage engine for the the RDBMS from phpMyAdmin you can go to:

Click on Server: MySQL:3306 >> More settings >> Variables Tab

Search for the default storage engine and change it to InnoDB.


In case you use phpMyAdmin and have ALL PRIVILEGES it can be set to set to InnoDB under the menu Variables > default storage engine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜