<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/31/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Agsteele</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/31/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Agsteele"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/31/en/Special:Contributions/Agsteele"/>
	<updated>2026-04-09T06:08:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/31/en/index.php?title=Migration_from_MyISAM_to_InnoDB&amp;diff=95422</id>
		<title>Migration from MyISAM to InnoDB</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/31/en/index.php?title=Migration_from_MyISAM_to_InnoDB&amp;diff=95422"/>
		<updated>2012-01-25T12:09:45Z</updated>

		<summary type="html">&lt;p&gt;Agsteele: /* Various Methods described in Moodle Forums (choose one) */  Updating innodb script path&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
This page only applies to administrators using Moodle with a MySQL database.&lt;br /&gt;
It&#039;s about migrating [http://dev.mysql.com/doc/refman/5.1/en/storage-engines.html MySQL storage engine].&lt;br /&gt;
&lt;br /&gt;
See [http://moodle.org/mod/forum/discuss.php?d=162871 Documentation for migration from MyISAM to InnoDB] for the current discussion which prompted the creation of this page. --[[User:Frank Ralf|Frank Ralf]] 11:41, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Difference between MyISAM and InnoDB ==&lt;br /&gt;
* read [http://tag1consulting.com/MySQL_Engines_MyISAM_vs_InnoDB]&lt;br /&gt;
* InnoDB is best for data integrity, not so good for searching large files, and uses up more CPU cycles and storage space than MyISAM equivalent &lt;br /&gt;
* InnoDB is much younger than MyISAM but is becoming increasingly attractive ... but because it is more complex, some utilities written for MyISAM like mysqlhotcopy may not work&lt;br /&gt;
* It is perfectly OK to select InnoDB for certain tables, and MyISAM for others (based on above criteria)&lt;br /&gt;
&lt;br /&gt;
== MySQL Configuration ==&lt;br /&gt;
Before attempting to change the table type, you should:&lt;br /&gt;
* &#039;&#039;&#039;check InnoDB is enabled&#039;&#039;&#039;. Log in to MySQL and run the command [http://dev.mysql.com/doc/refman/5.1/en/show-engines.html SHOW ENGINES]. Make sure that support for InnoDB shows either &amp;quot;YES&amp;quot; or &amp;quot;DEFAULT&amp;quot;.&lt;br /&gt;
* &#039;&#039;&#039;set innodb_file_per_table if required&#039;&#039;&#039;. [http://dev.mysql.com/doc/refman/5.1/en/innodb-multiple-tablespaces.html This setting] can be useful for large installations, but it only affects newly created tables and can&#039;t be applied retrospectively.&lt;br /&gt;
&lt;br /&gt;
== Various Methods described in Moodle Forums (choose one)==&lt;br /&gt;
* run the innodb script as a webpage http://www.YOUR_MOODLE_SITE/admin/tool/innodb (v2.2.1 You should be logged into your Moodle site as an administrator - there might be timeout issues on large databases) In earlier versions of Moodle 2.x the script was at http://www.YOUR_MOODLE_SITE/admin/innodb.php&lt;br /&gt;
* use the CLI script in admin/cli/mysql_engine.php  (requires access to shell, and the config.php must only have one moodle instance, but has no timeout issues) &lt;br /&gt;
* use PHPMyAdmin entering Structure view of a table and clicking Operations tab. Look for Storage Engine parameter. This is a tedious task due to the number of tables [http://moodle.org/mod/forum/discuss.php?d=162002]&lt;br /&gt;
* perform a database dump (e.g. mysqldump moodle_database &amp;gt; dump.SQL), use an editor or sed/perl/awk command to find/replace , replacing MyISAM with InnoDB.  Finally, restore back in the server. (e.g. mysql &amp;lt; dump.SQL or equivalent). &#039;&#039;&#039;If using this method, be very careful to use the same file encoding on both input and output.&#039;&#039;&#039;&lt;br /&gt;
* Follow the process detailed here - https://sites.google.com/site/moodlemayhem/tcea2011-moodle-server-setup-basics/moodleacidtrip&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=117913 New moodle.org] forum discussion&lt;br /&gt;
&lt;br /&gt;
* [http://tag1consulting.com/MySQL_Engines_MyISAM_vs_InnoDB MySQL Engines: MyISAM vs. InnoDB] article by Tag1 Consulting&lt;br /&gt;
&lt;br /&gt;
* [http://code.openark.org/blog/mysql/useful-sed-awk-liners-for-mysql An easy migration of MyISAM mysqldump to InnoDB]&lt;br /&gt;
&lt;br /&gt;
[[fr:Migration de MyISAM vers InnoDB]]&lt;/div&gt;</summary>
		<author><name>Agsteele</name></author>
	</entry>
</feed>