mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-08-23 04:03:29 +08:00
20140702-3 选题
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
How to check MySQL storage engine type on Linux
|
||||
================================================================================
|
||||
> **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.
|
||||
|
||||

|
||||
|
||||
### 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][1]. 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 <mysql_user> -p -i <database-name>
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/check-mysql-storage-engine-type-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://xmodulo.com/2013/06/how-to-install-mysql-server-and-client-on-linux.html
|
||||
@@ -0,0 +1,41 @@
|
||||
How to create sosreport in linux (RHEL 5.X / RHEL 6.X)
|
||||
================================================================================
|
||||
**Sosreport** is a command in linux (**RHEL / CentOS**) which collects **system configuration** and diagnostic information of your linux box like running kernel version, loaded modules, and system and service configuration files. This command also runs external programs to collect further information, and stores this output in the resulting archive.
|
||||
|
||||
Sosreport is required when you have open a case with redhat for technical support. Redhat support Engineers will require sosreport of your server for troubleshooting purpose.
|
||||
|
||||
To run sosreport , **sos** package should be installed. Sos package is part of default installation in most of linux. If for any reason this package is no installed , then use below yum command to install **sos package** :
|
||||
|
||||
# yum install sos
|
||||
|
||||
### Generate the report ###
|
||||
|
||||
Open the terminal type sosreport command :
|
||||
|
||||
# sosreport
|
||||
|
||||
This command will normally complete within a **few minutes**. Depending on local configuration and the options specified in some cases the command may take longer to finish. Once completed, sosreport will generate a compressed a file under **/tmp** folder. Different versions use different compression schemes (**gz, bz2, or xz**). The file should be provided to Redhat support representative (normally as an attachment to an open case).
|
||||
|
||||
**Note**: sosreport requires root permissions to run.
|
||||
|
||||
### Different Options used in sosreport command : ###
|
||||
|
||||
The sosreport command has a **modular structure** and allows the user to enable and disable modules and specify module options via the command line. To **list available modules** (plug-ins) use the following command:
|
||||
|
||||
# sosreport -l
|
||||
|
||||
To turn off a module include it in a comma-separated list of modules passed to the -n/–skip-plugins option. For instance to disable both the kvmand amd modules:
|
||||
|
||||
# sosreport -n kvm,amd
|
||||
|
||||
Individual modules may provide additional options that may be specified via the -k option. For example on Red Hat Enterprise Linux 5 installations the sos rpm module collects "rpm -Va" output by default. As this may be time-consuming the behavior may be disabled via:
|
||||
|
||||
# sosreport -k rpm.rpmva=off
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/how-to-create-sosreport-in-linux/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
Reference in New Issue
Block a user