• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

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

mysql 搞代码 7年前 (2018-06-05) 156次浏览 已收录 0个评论

关于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%’;


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:关于Linux系统上遇到的MySql有关问题,求指导

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址