> 데이터 베이스 > MySQL 튜토리얼 > How to check MySQL storage engine type on Linux_MySQL

How to check MySQL storage engine type on Linux_MySQL

WBOY
풀어 주다: 2016-05-31 08:50:14
원래의
1155명이 탐색했습니다.

Question: I need to know whether my MySQL database table is MyISAM or Innodb type. How can I check the type of a MySQL database table?

There are two major MySQL storage engines used: MyISAM and Innodb . MyISAM is non-transactional, and thus can be faster for reads, while InnoDB fully supports transactions (e.g., commit/rollback) with finer-grain locking. When you create a new MySQL table, you choose its type (i.e., storage engine). Without any choice, you will simply use a pre-configured default engine.

If you would like to know the type of an existing MySQL database table, there are a couple of ways to do it.

Method One

If you have access to phpMyAdmin, you can find out the database type from phpMyAdmin. Simply choose your database from phpMyAdmin to see a list of its tables. Under "Type" column, you will see the database type for each table.

How to check MySQL storage engine type on Linux_MySQL

Method Two

If you can log in to a MySQL server directly, another way to identify the storage engine is to run the following MySQL command inside your MySQL server after logging in.

mysql> SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'my_database' AND TABLE_NAME = 'my_table';
로그인 후 복사

The above command will show the engine type of a table called 'my_table' in 'my_database' database.

Method Three

Yet another method to check the MySQL engine is to use mysqlshow , a command-line utility which shows database information. The mysqlshow utility comes with MySQL client package installation . To use mysqlshow , you need to supply MySQL server login credential.

The following command will show information about a particular database. Under "Engine" column, you will see the storage engine for each table.

$ mysqlshow -u -p -i

How to check MySQL storage engine type on Linux_MySQL

How to check MySQL storage engine type on Linux_MySQL Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿