Default Storage Engine Does Not Change
Posted by: Khuthaily (---.msl-mt.client.bresnan.net)
Date: December 12, 2015 08:34PM

The "my.ini" file states (in my "mysqli5.6.17" folder):
default-storage-engine=MYISAM

I change it to:
default-storage-engine=INNODB

However, when I restart all services, the default engine goes back to MYISAM. Can you someone help me? I don't think that was the case before upgrading my WampServer from 2.5 to 2.5.18 and my PHP from 5.6.14 to 7.0.0.

========== System and Status ============
1 - Windows 10 64bit
2 - WampServer 2.5.18 (64bit)
3 - Apache 2.4.16
4 - PHP 7.0.0
5 - MySQL 5.6.17
6 - Green Icon

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: Otomatic (Moderator)
Date: December 12, 2015 08:46PM

Hi,

The défaut_stockage_engine does not affect ENGINE type you want to use when create database or table.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: Khuthaily (---.msl-mt.client.bresnan.net)
Date: December 12, 2015 08:52PM

All my tables are in INNODB, but my default engine is MYISAM. Instead of making the change manually when I create a new table in PHPMyAdmin, I would like the default to be INNODB as well.

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: Otomatic (Moderator)
Date: December 13, 2015 09:51AM

Hi,

For Wampserver 2.5.18, in wamp\scripts\checkWampFiles.php, comment lines block :
/*if($check_default_engine_MYISAM) {
	//Check default-storage-engine=MYISAM to avoid problem with novices and innoDB
	if(strpos($myIniContents , "default-storage-engine"winking smiley === false) {
		$myIniContents = str_replace("[".$c_mysqlService."]\r\n", "[".$c_mysqlService."]\r\n"."# The default storage engine that will be used when create new tables\r\ndefault-storage-engine=MYISAM\r\n", $myIniContents);
		$my_ini_modified = true;
	}
	else {
		//Not commented and MYISAM
		if(preg_match("/^(?![ \t]*#).*default-storage-engine.*[ \t]*=[ \t]*MYISAM\r?\n/m", $myIniContents, $matches) !== 1) {
			$myIniContents = preg_replace("/^.*default-storage-engine.*\r?\n/m","default-storage-engine=MYISAM\r\n",$myIniContents);
			$my_ini_modified = true;
		}
	}
}*/

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: RiggsFolly (---.as43234.net)
Date: December 13, 2015 03:39PM

In later versions of MYSQL the default engine is INNODB.

We however decided to add this parameter

default-storage-engine=MYISAM

to the `my.ini` as people seemed to be getting into problems with INNODB databases, specifically they were getting corrupted, possibly by shutting down Windows without stopping the MYSQL database server cleanly, and of course they hardly ever had a backup of these databases, and had no idea how to follow the instructions in the MYSQL ERROR LOG to attempt recovery.


Now if you want your default to be INNODB, just comment out the above parameter from the `my.ini`

It appears that phpMyAdmin will default the default engine type defined in MYSQL Server, or at least it did for me using WAMPServer3.0.0.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 12/16/2015 09:53PM by RiggsFolly.

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: Khuthaily (---.msl-mt.client.bresnan.net)
Date: December 13, 2015 05:51PM

Merci, Otomatic. YES; it is working.

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: gasya (---.189.57.37.triolan.net)
Date: December 16, 2015 06:12PM

how do it in 3.0.1 64bit?

Options: ReplyQuote
Re: Default Storage Engine Does Not Change
Posted by: Otomatic (Moderator)
Date: December 16, 2015 06:28PM

Hi,

> how do it in 3.0.1 64bit?
Just modify wampmanager icon->MySQL->my.ini file. to comment or modify the line
default-storage-engine=MYISAM

With Wampserver 2.5.18 this line was checked and changed if there was no MyISAM.
With Wampserver 3.0.x this line is not checked, so not changed.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.