mysql常规日志_无法启用MySQL常规日志。我做错什么了?

我在

Ubuntu 18.04

具有

MySQL 5.7.24

我正在尝试启用

general_log

作为

described here

.

所以在我的

/etc/mysql/my.cnf

我补充说:

general_log = on

general_log_file=/tmp/mysql.log

然后我停止并再次启动MySQL,但我得到一个错误:

$ sudo service mysql stop

$ sudo service mysql start

Job for mysql.service failed because the control process exited with error code.

See "systemctl status mysql.service" and "journalctl -xe" for details.

所以我退房了

systemctl status mysql.service

â mysql.service - MySQL Community Server

Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Fri 2019-01-04 17:50:31 CET; 45s ago

Process: 27206 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)

Process: 27613 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

Main PID: 27208 (code=exited, status=0/SUCCESS)

Jan 04 17:50:31 librem systemd[1]: mysql.service: Failed with result 'exit-code'.

Jan 04 17:50:31 librem systemd[1]: Failed to start MySQL Community Server.

Jan 04 17:50:31 librem systemd[1]: mysql.service: Service hold-off time over, scheduling restart.

Jan 04 17:50:31 librem systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.

Jan 04 17:50:31 librem systemd[1]: Stopped MySQL Community Server.

Jan 04 17:50:31 librem systemd[1]: mysql.service: Start request repeated too quickly.

Jan 04 17:50:31 librem systemd[1]: mysql.service: Failed with result 'exit-code'.

Jan 04 17:50:31 librem systemd[1]: Failed to start MySQL Community Server.

journalctl -xe

我也一样。

我尝试在中创建日志文件

/tmp/mysql.log

把它改成

777

但是,这样做之后,启动MySQL失败,错误相同。

有人知道这里怎么了吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值