First, determine the version
View MySQL version
Copy Code code as follows:
Or you can log in to MySQL using select version (); or status; Command view
Ii. Commencement of work
Close MySQL
Copy Code code as follows:
If the above command cannot close MySQL, use the kill-9 command to force the kill process;
To modify the MySQL profile my.cnf (usually located in/etc/mysql/my.cnf), add the following fields
For MySQL 5.5:
Copy Code code as follows:
Default-storage-engine=myisam
Loose-skip-innodb
Loose-innodb-trx=0
Loose-innodb-locks=0
Loose-innodb-lock-waits=0
Loose-innodb-cmp=0
Loose-innodb-cmp-per-index=0
Loose-innodb-cmp-per-index-reset=0
Loose-innodb-cmp-reset=0
Loose-innodb-cmpmem=0
Loose-innodb-cmpmem-reset=0
Loose-innodb-buffer-page=0
Loose-innodb-buffer-page-lru=0
Loose-innodb-buffer-pool-stats=0
For MySQL 5.6:
Copy Code code as follows:
Default-storage-engine=myisam
Default-tmp-storage-engine=myisam
Loose-skip-innodb
loose-innodb-trx=0
loose-innodb-locks=0
loose-innodb-lock-waits=0
Loose-innodb-cmp=0
loose-innodb-cmp-per-index=0
loose-innodb-cmp-per-index-reset=0
Loose-innodb-cmp-reset=0
loose-innodb-cmpmem=0
loose-innodb-cmpmem-reset=0
Loose-innodb-buffer-page=0
loose-innodb-buffer-page-lru=0
loose-innodb-buffer-pool-stats=0
loose-innodb-metrics=0
Loose-innodb-ft-default-stopword=0
Loose-innodb-ft-inserted=0
Loose-innodb-ft-deleted=0
Loose-innodb-ft-being-deleted=0
loose-innodb-ft-config=0
loose-innodb-ft-index-cache=0
Loose-innodb-ft-index-table=0
loose-innodb-sys-tables=0
loose-innodb-sys-tablestats=0
Loose-innodb-sys-indexes=0
loose-innodb-sys-columns=0
loose-innodb-sys-fields=0
Loose-innodb-sys-foreign=0
Loose-innodb-sys-foreign-cols=0
Third, view the effect
Login to MySQL
Copy Code code as follows:
Display the database engine used
Copy Code code as follows:
Show engines
+--------------------+---------+----------------------------------------------------------------+-------------- +------+------------+
| Engine | Support | Comment | Transactions | XA | savepoints |
+--------------------+---------+----------------------------------------------------------------+-------------- +------+------------+
| Federated | NO | Federated MySQL Storage Engine | NULL | NULL | NULL |
| CSV | YES | CSV Storage Engine | NO | NO | NO |
| Mrg_myisam | YES | Collection of identical MyISAM tables | NO | NO | NO |
| Blackhole | YES | /dev/null Storage Engine (anything you write to it disappears) | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| InnoDB | NO | Supports transactions, Row-level locking, and foreign keys | NULL | NULL | NULL |
| ARCHIVE | YES | Archive Storage Engine | NO | NO | NO |
| MyISAM | DEFAULT | MyISAM Storage Engine | NO | NO | NO |
| Performance_schema | YES | Performance Schema | NO | NO | NO |
+--------------------+---------+----------------------------------------------------------------+-------------- +------+------------+
9 Rows in Set (0.00 sec)