Home>Article>Operation and Maintenance> How to view mysql error log in linux
Method: 1. Use the "cd /usr/local/mysql/data" command to enter the data directory in the mysql installation directory; 3. Use the "ll" command to obtain the files in the directory and find the suffix " .err" error log; 3. Use "vim file with suffix err" to view the error log.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
1. Enter the mysql installation directory
Enter the data directory (this directory stores database data)
cd /usr/local/mysql cd /usr/local/mysql/data
2. Use the ll command to view the directory under the file
# ll
3. Enter the mysql directory and find the file suffix .err, which is the mysql running error log,
can be opened with the vi command to view the latest error message for analysis and troubleshooting one by one.
Recommended learning:Linux video tutorial
The above is the detailed content of How to view mysql error log in linux. For more information, please follow other related articles on the PHP Chinese website!