ubuntu开启慢日志
ubuntu 开启mysql日志记录
1.找到mysql的配置文件
sudo vim /etc/mysql/my.cnf
将下面两行的#去掉
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
2.重启mysql服务
sudo service mysql restart
3.实时查看
tail -f /var/log/mysql/mysql.log
ubuntu 开启mysql日志记录
1.找到mysql的配置文件
sudo vim /etc/mysql/my.cnf
将下面两行的#去掉
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
2.重启mysql服务
sudo service mysql restart
3.实时查看
tail -f /var/log/mysql/mysql.log