情况:

今早发现,昨天下午安装的4台mysql服务器,突然出现,由于在shell窗口

(root@localhost:mysql.sock) [(none)]> 190102 18:12:16 mysqld_safe mysqld from pid file /home/data/mysqldata/3306/data/mysql3.pid ended

什么情况,mysql意外关闭,4个shell窗口都出现了同样的错误,还是有点紧张,于是赶紧找error日志

[mysql@mysql3 scripts]$ tail -f -n 200 /home/data/mysqldata/3306/log/mysql-error.log

2019-01-02 17:24:21 3654 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.15-log' socket: '/home/data/mysqldata/3306/mysql.sock' port: 3306 MySQL Community Server - (GPL)
2019-01-02 17:24:21 3654 [Note] Event Scheduler: scheduler thread started with id 1
2019-01-02 17:27:46 3654 [Warning] 'proxies_priv' entry '@ root@mysql1' ignored in --skip-name-resolve mode.
2019-01-02 18:12:05 3654 [Note] /usr/sbin/mysqld: Normal shutdown 2019-01-02 18:12:05 3654 [Note] Giving 3 client threads a chance to die gracefully
2019-01-02 18:12:05 3654 [Note] Event Scheduler: Killing the scheduler thread, thread id 1
2019-01-02 18:12:05 3654 [Note] Event Scheduler: Waiting for the scheduler thread to reply
2019-01-02 18:12:05 3654 [Note] Event Scheduler: Stopped
2019-01-02 18:12:05 3654 [Note] Event Scheduler: Purging the queue. 0 events
2019-01-02 18:12:05 3654 [Note] Shutting down slave threads
2019-01-02 18:12:15 3654 [Note] Forcefully disconnecting 1 remaining clients
2019-01-02 18:12:15 3654 [Warning] /usr/sbin/mysqld: Forcing close of thread 6 user: 'root' 2019-01-02 18:12:15 3654 [Note] Binlog end
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'partition'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'BLACKHOLE'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_METRICS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_CMP'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'INNODB_TRX'
2019-01-02 18:12:15 3654 [Note] Shutting down plugin 'InnoDB'
2019-01-02 18:12:15 3654 [Note] InnoDB: FTS optimize thread exiting.
2019-01-02 18:12:15 3654 [Note] InnoDB: Starting shutdown...
2019-01-02 18:12:16 3654 [Note] InnoDB: Shutdown completed; log sequence number 7120303
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'ARCHIVE'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'MRG_MYISAM'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'MyISAM'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'MEMORY'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'CSV'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'sha256_password'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'mysql_old_password'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'mysql_native_password'
2019-01-02 18:12:16 3654 [Note] Shutting down plugin 'binlog'
2019-01-02 18:12:16 3654 [Note] /usr/sbin/mysqld: Shutdown complete 190102 18:12:16 mysqld_safe mysqld from pid file /home/data/mysqldata/3306/data/mysql3.pid ended
190102 18:13:32 mysqld_safe Starting mysqld daemon with databases from /home/data/mysqldata//data
2019-01-02 18:13:34 4770 [Note] Plugin 'FEDERATED' is disabled.

如上面的日志标记所示,4台都是一样,很奇怪为什么会发现这样的问题

系统:cpu 4核,内存18g,磁盘hdd 200g

[root@mysql3 ~]# cat /etc/redhat-release
Kylin Linux release 3.3.1707 (Core)

mysql version:

Server version: 5.6.15-log MySQL Community Server - (GPL)

刚安装好的机器,不应该出现这样的问题,但是除了我,又没有谁来搞这个mysql,看了 linux的history

[root@mysql3 ~]# export HISTTIMEFORMAT='%F %T '
105 2019-01-02 15:55:27 whereis mysql
106 2019-01-02 15:55:31 which mysql
107 2019-01-02 15:57:08 vim /home/data/mysqldata/3306/my.cnf
108 2019-01-02 16:00:39 chown -R mysql:mysql /home/data/mysqldata/
109 2019-01-02 16:00:43 su - mysql
110 2019-01-03 09:00:19 history
111 2019-01-03 09:00:44 su - mysql
112 2019-01-03 10:06:49 cd /home/so
113 2019-01-03 10:06:54 cd /home/

没有相应时间的history

[root@mysql1 3306]# su - mysql
[mysql@mysql1 ~]$ history
66 2019-01-02 17:41:10 cd ../scripts/
67 2019-01-02 17:41:11 ll
68 2019-01-02 17:44:00 mysql -uroot -p -S /home/data/mysqldata/3306/mysql.sock
69 2019-01-03 08:38:13 ll
70 2019-01-03 08:38:15 cd ..
71 2019-01-03 08:38:17 cd 3306/log/

找不到问题,这时候开始网上找找,发现有一些人遇到这个问题

2019-01-02 18:09:56 3549 [Note] /usr/sbin/mysqld: Normal shutdown

但是回答的大部分都是,找找是否有history |grep mysqladmin 或者service mysqld stop等命令,看看是否手动或者其他的关闭了mysql

因为从error上看,是正常的关闭mysql服务

查看slow log也没有什么发现

还看到有一个帖子

https://dba.stackexchange.com/questions/40581/usr-libexec-mysqld-normal-shutdown-but-my-team-doesnt-do-that

有提到bug的帖子

https://bugs.mysql.com/bug.php?id=51081

由于还是找不到原因,寻思许久,不得解

这是问了一下开发同学 是否有重启过数据库,一问,才发现,他们悄悄的修改了my.cnf,然后同时重启了这4台机器。。。。。

哎,搞了半天,。。被开发的重启了,

这里警示了一个重要的问题,数据库就让dba团队来管控,开发只需要提出需求就好,而不是自己想当然的进行修改,,

按理说我们已经有 开发规范,管理规范,这种还是控制不住,毕竟。。。

mysql 无意重启 [Note] /usr/sbin/mysqld: Normal shutdown的更多相关文章

  1. mysql报错:/usr/sbin/mysqld:unknown variable 'default-character-set=utf8'

    修改mysql的字符集时,为了将默认字符集设置为utf-8,便将/etc/my.cnf下[mysqld]加了一行 default-character-set=utf8, 但是在下次启动系统的时候,my ...

  2. 解决报错ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code

    问题的由来 MySQL服务没有正常关机,是电脑没电后自动关机产生,记录一下排查过程 1.本以为是pid的问题,上网找了教程,解决不了,然后看日志看了网上各种说是数据库内存溢出 2021-03-12T1 ...

  3. Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist

    问题:在linux上安装mysql的时候出现Plugin ‘FEDERATED’ is disabled. /usr/sbin/mysqld: Table ‘mysql.plugin’ doesn’t ...

  4. mysql 错误解决:Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist

    今天安装完Mysql后,开启发生了错误: 1.打开相应文件夹,查看错误信息: 2.打开错误信息文件,查看错误原因是:Plugin 'FEDERATED' is disabled. /usr/sbin/ ...

  5. 报错:/usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_summary_by_account_by_event_name.frm' (errno: 13 - Permission denied)

    报错背景: Linux环境下安装MySQL数据库. 安装完成,数据库初始化,启动数据库时报错. 报错现象: -- :: [ERROR] Native table 'performance_schema ...

  6. MySQL 2003 [ERROR] /usr/sbin/mysqld: Incorrect key file for table './keyword_search/keyword.MYI'; try to repair it

    今天对一个有四百多万数据的表增加一个功能时,当做数据插入时,显示没有插入,到Linux的log下面查看了发现下面这条错误信息 在stacOver上面找到这句: 存储引擎(MyISAM)支持修复表.你应 ...

  7. Can't connect to local MySQL Server throught socket '/var/run/mysqld/mysqld.sock'(2)

    www.iwangzheng.com 由于之前调整了/etc/mysql/my.cnf试图修复数据库不能存中文的问题,这个问题没解决,以至于数据库连接不上了. tail -f /var/log/mys ...

  8. Running MYSQL 5.7 By Bash On Ubuntu On Windows:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    root@PC-RENGUOQIANG:/usr/sbin# /etc/init.d/mysql start * Starting MySQL database server mysqld [ OK ...

  9. 解决:error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

    在使用 deamon@deamon-H55M-S2:/usr/bin$ mysqladmin -u root -p shutdown 关闭MySQL之后试图通过: deamon@deamon-H55M ...

随机推荐

  1. jsp:xpath - xml

    .1 关于“/ ”和“// ”的使用“/”是表示当前文档的节点,类似 DOS 目录分割符,“//”则表示当前文档所有的节点.类似查看整个目录.(1)/authors/author:表示选择根目录下.父 ...

  2. IE兼容性测试工具IETester

    IE兼容性测试工具:IETester 1.这种做法,不能做到100%的覆盖: 2.实际的业务场景会比IEtester更符合.

  3. angular-messages.js信息验证的使用

    ngMessages(1.3+) 众所周知,表单和验证是Angular中复杂的组件之一.上面的例子不是特别好,不简洁.在Angular 1.3发布前,表单验证必须以这种方式编写.然而在发布的Angul ...

  4. linux/unix shell bash script 小记

    #script PSAATL11*` do $i | awk -F ':' '{print $1}'` do ((k=j+)); m=$(zcat $i | sed -n ${j},${k}p); e ...

  5. Maven入门:Maven的基本概念

    本文转自:http://www.tianmaying.com/tutorial/maven-basic 看这篇文章之前,你应该先Run起来一个简单的Maven项目,先有个感性认识,然后再来听听对这些基 ...

  6. flowable 6.1.2 命令行完成请假审批流程的例子

    一.创建 eclipse maven新项目 1.设置项目选项 其中,Create a simple project 要选中. 2.填写项目包名和项目名称 这里的Group id:必须是 org.flo ...

  7. Android Broadcast 和 BroadcastReceiver的权限机制

    在Android应用开发中,有时会遇到以下两种情况, 1. 一些敏感的广播并不想让第三方的应用收到 : 2. 要限制自己的Receiver接收某广播来源,避免被恶意的同样的ACTION的广播所干扰. ...

  8. 机器学习(八)—Apriori算法

    摘要:本文对Apriori算法进行了简单介绍,并通过Python进行实现,进而结合UCI数据库中的肋形蘑菇数据集对算法进行验证. “啤酒与尿布”的例子相信很多人都听说过吧,故事是这样的:在一家超市中, ...

  9. 【占位】HihoCoder1317 跳舞链

    跳舞链 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Ho最近遇到一个难题,他需要破解一个棋局. 棋局分成了n行,m列,每行有若干个棋子.小Ho需要从中选择若干行使得 ...

  10. HBase错误大全

    1. stopping hbasecat: /tmp/hbase-root-master.pid: No such file or directory 原因:hadoop的pid文件丢失,hadoop ...