Mac Os - Como trocar o storage engine de InnoDB para MyISAM

Tive que ralar um pouco para saber exatamente como trocar o storage engine do mysql de InnoDB para MyISAM. As alteração foram feitas no Mac OS Mavericks.
-->

Abaixo os passos:

Abra um terminal e digite:

sudo vi /usr/local/mysql/my.cnf

abaixo da palavra  [mysqld] coloque a seguinte linha, aperte antes i para entrar no modo de edição do vim:

default-storage-engine=myisam

Depois aperte a tecla ESC, digite :wq e aperte enter, arquivo salvo, vá até o painel de controle do Mac OS, pare o Mysql e inicie novamente, agora o engine padrão é o MyISAM.

Para confirmar digite no terminal:

mysql -u root -p

Digite sua senha de root do mysql, dentro do prompt dele digite:

mysql> show engines;

Vai aparecer assim:

mysql> show engines;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    6
Current database: *** NONE ***

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MyISAM             | DEFAULT | MyISAM storage engine                                          | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| InnoDB             | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
9 rows in set (0,01 sec)



Veja que agora o MyISAm esta como default, antes da modificação estava assim:


mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
9 rows in set (0,03 sec)



Esper ter ajudado.



Comentários

Postagens mais visitadas deste blog

Transformando o Linksys WRT54G2 V1 em bridge, repetidor

Recuperando partições deletadas

How to install YUM and other rpm packages on VIOs and AIX manually