关于linux系统下遇到的mysql问题_关于Linux系统上遇到的MySql有关问题,求指导

关于Linux系统下遇到的mysql问题,求指导

问题1:

Mysql是安装在linux体统中,操作是通过使用WindowsXP 下的软件Navicat 8 for MySQL,在连接上Linux中的数据库之后,打开了我使用的库,然后在事件中增加了一个事件,在事件的计划任务中,勾选了Every 1 Hour, Starts 2010-07-14 10:00:00。这个计划任务主要是调用了一个存储过程,存储过程语句如下:

begin

delete from GJ_VEH1L where JGSJ < date_sub( now(), interval 3 month) order by JGSJ;

delete from GJ_VEH1L_BACK where JGSJ < date_sub( now(), interval 3 month) order by JGSJ;

end

症状是,有的机器突然就不执行这个计划任务了,求解决方法及可能原因。

问题2:

在Linux系统中 配置 /etc/my.cnf文件,在【mysqld】下 加入了如下代码:

log=/data/GKJManager/mysql_log/log.log

slow-query-log_file=/data/GKJManager/mysql_log/slow-query-log.log

log-error=/data/GKJManager/mysql_log/log-err.log

log-queries-not-using-indexes = /data/GKJManager/mysql_log/nouseindex.log

希望能够打开 我计划任务执行时的日志,但是加了如下代码之后,在/data/GKJManager/mysql_log这个文件夹中,只产生了log-err.log,而且貌似只生成了 我输入service mysql restart 之后的错误信息,错误信息如下:

120917 11:41:11 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended

120917 11:41:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

120917 11:41:12 [Warning] /usr/local/mysql/bin/mysqld: ignoring option '--log-queries-not-using-indexes' due to invalid value '/data/GKJManager/mysql_log/nouseindex.log'

120917 11:41:12 [Note] Plugin 'FEDERATED' is disabled.

120917 11:41:12 InnoDB: Started; log sequence number 0 46459

120917 11:41:12 [Note] Event Scheduler: Loaded 1 event

120917 11:41:12 [Note] Event Scheduler: scheduler thread started with id 1

120917 11:41:12 [Note] /usr/local/mysql/bin/mysqld: ready for connections.

Version: '5.1.36-log' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)

120917 13:32:03 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

120917 13:32:03 [Note] Event Scheduler: Killing the scheduler thread, thread id 1

120917 13:32:03 [Note] Event Scheduler: Waiting for the scheduler thread to reply

120917 13:32:03 [Note] Event Scheduler: Stopped

120917 13:32:03 [Note] Event Scheduler: Purging the queue. 1 events

120917 13:32:03 InnoDB: Starting shutdown...

120917 13:32:04 InnoDB: Shutdown completed; log sequence number 0 46459

120917 13:32:04 [Warning] Forcing shutdown of 1 plugins

120917 13:32:04 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

120917 13:32:04 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended

120917 13:32:04 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

120917 13:32:04 [Warning] The syntax '--log' is deprecated and will be removed in MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.

120917 13:32:04 [Warning] /usr/local/mysql/bin/mysqld: ignoring option '--log-queries-not-using-indexes' due to invalid value '/data/GKJManager/mysql_log/nouseindex.log'

120917 13:32:04 [Note] Plugin 'FEDERATED' is disabled.

120917 13:32:05 InnoDB: Started; log sequence number 0 46459

/usr/local/mysql/bin/mysqld: File '/data/GKJManager/mysql_log/log.log' not found (Errcode: 13)

120917 13:32:05 [ERROR] Could not use /data/GKJManager/mysql_log/log.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

120917 13:32:05 [Note] Event Scheduler: Loaded 1 event

120917 13:32:05 [Note] Event Scheduler: scheduler thread started with id 1

120917 13:32:05 [Note] /usr/local/mysql/bin/mysqld: ready for connections.

想知道为什么没有生成其他的日志信息,有知道的麻烦回答我一下,谢谢了!!

------解决方案--------------------

症状是,有的机器突然就不执行这个计划任务了,求解决方法及可能原因。

show events 检查一下。另外检查一下变量 event_scheduler

mysql> show variables like '%sc%';

e7ce419cf2d6ad34d01da2ceb8829eed.png

微信 赏一包辣条吧~

023a57327877fb4402bcc76911ec18ea.png

支付宝 赏一听可乐吧~

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值