In the process of testing software test engineers, the process is often the first interface testing, followed by functional testing. In doing functional testing, they often have to work such a scenario, that is, after an error, how fast we can exclude database error.
For example an electricity supplier sites, when the input "TV" We text box and click the Search button, the results show if the site is wrong, and that testers need to go check the database. But how can we quickly locate the bug it? This time, we need to use mysql logs to solve this problem.
Mysql log is used to record all database CRUD operations, testers can use the tool to look for a functional software sql statement executed sql statement to see which data warehouse operations, which table, convenient test to quickly locate bug.
But Mysql log, usually are closed, because the log database consumes 5% -10% performance, generally open only to find the problem, promptly closed after completion.
This article will detail how to use the mysql navicat log in. This article will expand in accordance with the following steps:
- The first step, download the corresponding software from a network drive
- The second step, mysql client connections
- The third step, the query log state
- The fourth step, open the log
- The fifth step, view the log
- The sixth step, close the log
The first step - installing navicat
Goal: Download the complete Software + Software Installation
Step: downloaded from the Baidu network disk and install software directly navicat
download link:
Links: https://pan.baidu.com/share/init?surl=tLLNKTkcrtp4-H6BzwYx0w extraction code: 8e67
Tip: navicat testers during the operation of the database when a navicat the most commonly used software.
Installation: Baidu navicat the Web site to download the software, double-click the icon navicat software, all the way to the next step, the installation can be completed.
Step Two - navicat connection mysql
Target: client connection MySQL (putty can connect to the server using tools, can be used directly linux terminal)
Step: As shown below
Summary: Be sure to implement navicat client connections mysql, procedure is very simple.
The third step - open mysql log
Target: open mysql log
Step: Open log 2 divided into the following steps:
step1: View the status log, if logging is Off, you will need to open. Query methods, enter the following code to
show variables like 'general%';
Run
step2: open the log. Very simple, just run the following command in the query editing, you can
set global general_log = 1;
Select -> Right-run has been selected, the query editor opens
step3: view the log, the log status is on, the log was open state.
show variables like 'general%';
Run
Summary: Backup is very simple. Two steps to complete.
The fourth step - opening the log file
Goal: If data is accidentally deleted, know how to recover data
Steps: the step of opening only the following two-step
step1: su command, to achieve a normal user to root and user
step2: inputtail -f 日志路径
Open log file
Step 5 - Enter the sql statement (similar to click on the search button) to view the log shows
Goal: Enter the sql statement (similar to click on the search button),
Step: Check the following log is only 2 steps Step
step1: Enter the sql statement in the Query Editor (similar to click the search button)
step2: View in the log, first locate the sql statement by the operating time, detailed information below sql statement, positioning data warehouse and data tables, easy test to quickly locate bug.
Step Six - Log Off
Goal: Log off, otherwise it will cost 5% -10% of database performance
Step: close the log, only Step 1 of the following steps
to sum up
More than 5 steps that we use all of the steps navicat data backup and recovery. We come under review
The first step is to download the software from the Baidu network disk navicat. To lower after installation.
The second step, to make the connection Mysql navicat
third step, the query log state
fourth step, open the log
fifth step, view the logs
sixth step, close the log
Well, according to our technical articles quickly to try to use the mysql log it. Master the method uses mysql log, you can increase the speed of Oh exclude bug. Come on.