1.打开mysql配置文件,将68,69行的注释取消掉,保存关闭

  sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

 

  ubuntu更改mysql配置文件,使其产生日志文件mysql.log

 

2.重启mysql服务

  sudo service mysql restart

 

3,日志文件所在目录

  /var/log/mysql/mysql.log

 

4.实时查看日志文件

  sudo tail -f /var/log/mysql/mysql.log

  测试:执行一句查询语句

  ubuntu更改mysql配置文件,使其产生日志文件mysql.log

  结果

   ubuntu更改mysql配置文件,使其产生日志文件mysql.log

转载注明出处:https://www.cnblogs.com/jum-bolg/p/11349590.html

相关文章:

  • 2021-11-21
  • 2021-10-06
  • 2021-06-02
  • 2021-06-21
  • 2021-10-09
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-30
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-12-03
相关资源
相似解决方案