数据库错误日志

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/QinDaBao_/article/details/88666942

1.进入 mysql 安装目录
进入 data 目录(该目录存储的是数据库的数据)

cd /usr/local/mysql/data

2.查找下包含err的日志文件

root@123:/usr/local/mysql/data# ls
auto.cnf        ib_logfile0  julyedu           mysql-bin.000006  mysql-bin.000009  mysql-bin.000012  mysqld_safe.pid  mysql-slow.log   performance_schema
ib_buffer_pool  ib_logfile1  mysql             mysql-bin.000007  mysql-bin.000010  mysql-bin.000013  mysql-error.log  mysql.sock       sys
ibdata1         ibtmp1       mysql-bin.000005  mysql-bin.000008  mysql-bin.000011  mysql-bin.index   mysql.pid        mysql.sock.lock

3.tail命令动态查看报错

root@123:/usr/local/mysql/data# tail -f 5 mysql-error.log 
tail: cannot open '5' for reading: No such file or directory
==> mysql-error.log <==
2017-12-28T11:57:51.772448Z 26 [Note] Access denied for user 'test'@'140.205.201.30' (using password: YES)
2017-12-28T11:57:51.900547Z 27 [Note] Access denied for user 'test'@'140.205.201.30' (using password: YES)
2017-12-28T11:57:52.027600Z 28 [Note] Access denied for user 'test'@'140.205.201.30' (using password: YES)

猜你喜欢

转载自blog.csdn.net/QinDaBao_/article/details/88666942