簡體   English   中英

我無法將myISAM轉換為innodb

[英]I cannot convert myISAM to innodb

我做了擦拭和恢復。

  1. 我備份了我當前的innodb表。 (mysqldump的)
  2. 我把它加載到數據庫中。
  3. 出於某種原因......桌子現在都是myisam而不是innodb ......很奇怪!
  4. 我嘗試做:

    ALTER TABLE xxx ENGINE = innodb;

並且它對任何表都沒有任何作用。

“顯示表狀態”仍然是“MyISAM”

mysql> alter table auth_user_user_permissions engine=innodb;
Query OK, 0 rows affected, 1 warning (0.06 sec)
Records: 0  Duplicates: 0  Warnings: 0



+------------+----------+----------------------------------------------------------------+
| Engine     | Support  | Comment                                                        |
+------------+----------+----------------------------------------------------------------+
| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance         |
| MEMORY     | YES      | Hash based, stored in memory, useful for temporary tables      |
| InnoDB     | DISABLED | Supports transactions, row-level locking, and foreign keys     |
| BerkeleyDB | NO       | Supports transactions and page-level locking                   |
| BLACKHOLE  | YES      | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE    | NO       | Example storage engine                                         |
| ARCHIVE    | YES      | Archive storage engine                                         |
| CSV        | YES      | CSV storage engine                                             |
| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables                 |
| FEDERATED  | DISABLED | Federated MySQL storage engine                                 |
| MRG_MYISAM | YES      | Collection of identical MyISAM tables                          |
| ISAM       | NO       | Obsolete storage engine                                        |
+------------+----------+----------------------------------------------------------------+



# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb

innodb_buffer_pool_size = 10000M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size=1024M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit = 0


mysql> alter table auth_group engine=innodb;
Query OK, 0 rows affected, 1 warning (0.05 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> show warnings;
+---------+------+----------------------------------------------------+
| Level   | Code | Message                                            |
+---------+------+----------------------------------------------------+
| Warning | 1266 | Using storage engine MyISAM for table 'auth_group' |
+---------+------+----------------------------------------------------+
1 row in set (0.00 sec)

我在你的show engines輸出中看到你的MySQL安裝中禁用了InnoDB。 您需要啟用它才能將表從MyISAM轉換為InnoDB。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM