这个答案有点晚了,但可能会对其他人有所帮助。如果您担心在MySQL服务器上弄乱某些内容,则可以从phpMyAdmin创建表时更改默认引擎。为MySQL引擎的默认选择创建者在此功能下StorageEngine.class.php
的libraries
文件夹(在phpMyAdmin 3.5.8.2):
<?php
/**
* returns HTML code for storage engine select box
*
* @param string $name The name of the select form element
* @param string $id The ID of the form field
* @param string $selected The selected engine
* @param boolean $offerUnavailableEngines Should unavailable storage engines be offered?
*
* @static
* @return string html selectbox
*/
static public function getHtmlSelect($name = 'engine', $id = null,
$selected = null, $offerUnavailableEngines = false)
{
$selected = strtolower($selected);
$output = '<select name="' . $name . '"'
. (empty($id) ? '' : ' id="' . $id . '"') . '>' . "\n";
foreach (PMA_StorageEngine::getStorageEngines() as $key => $details) {
// Don't show PERFORMANCE_SCHEMA engine (MySQL 5.5)
// Don't show MyISAM for Drizzle (allowed only for temporary tables)
if (! $offerUnavailableEngines
&& ($details['Support'] == 'NO'
|| $details['Support'] == 'DISABLED'
|| $details['Engine'] == 'PERFORMANCE_SCHEMA')
|| (PMA_DRIZZLE && $details['Engine'] == 'MyISAM')
) {
continue;
}
$output .= ' <option value="' . htmlspecialchars($key). '"'
. (empty($details['Comment'])
? '' : ' title="' . htmlspecialchars($details['Comment']) . '"')
. (strtolower($key) == $selected || (empty($selected) && $details['Support'] == 'DEFAULT')
? ' selected="selected"' : '') . '>' . "\n"
. ' ' . htmlspecialchars($details['Engine']) . "\n"
. ' </option>' . "\n";
}
$output .= '</select>' . "\n";
return $output;
}
从以下查询中填充此选择:
SHOW STORAGE ENGINES
以下代码选择了MySQL配置文件设置的默认引擎:
(empty($selected) && $details['Support'] == 'DEFAULT')
但是,我们可以对其进行更改以使其选择InnoDB作为默认引擎:
(empty($selected) && $details['Engine'] == 'InnoDB')