Show Processlist; View the list of service processes
Show engines; all supplied engines
Show variables like '%storage_engine% '; the current default storage engine
Show create table table name; see what engine the table uses.
show slave status\g; view from server status
---------------------------Log-related----------------------------------------
Linux, open the Bin-log log,
VI/ETC/MY.CNF, modify Log_bin=mysql-bin (name casual)
Flush logs; Will have one more up-to-date Bin-log log
Show master status; View information about the last Bin-log log
Reset Master; Clear all the Bin-log logs
Show binary logs; view log size
Show Binlog Events View Log additional information
Common parameters of Mysqlbinlog:
--stop-position = "--start-position" = "50" Restores the parameters you want to recover based on the starting position or end position
--stop-date= "2016-03-02 12:00:00"--start-date= "2016-03-02 11:55:00" restores the parameters you want to restore based on the start date time or end position
Use the Mysqlbinlog tool to display the binary results of the record, and then import it into a text file for later recovery.
The detailed procedure is as follows:
Bin>mysqlbinlog--start-position=4--stop-position=106 mysqlbin-log.000001 > D:\\test1.txt
or export all:
Bin>mysqlbinlog mysqlbin-log.000001 >d:\\test1.txt
To view the Bin-log log:
Mysqlbinlog--no-defaults mysql-bin.000002
Data recovery with Bin-log logs
Mysqlbinlog--no-defaults mysql-bin.000002|mysql-uroot-p Root
MySQL some commands