mysql版本:社区版5.6.34

告警信息:

2016-12-13 15:55:11 4bc8b940 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.

2016-12-13 15:55:11 4bc8b940 InnoDB: Recalculation of persistent statistics requested for table "chenli"."cp_tb_test" but the requir

ed persistent statistics storage is not present or is corrupted. Using transient stats instead.

解决办法1:在配置文件中添加如下参数设置

innodb_stats_persistent=0

解决办法2:

1.删除表,一定要if exists

mysql> use mysql;

mysql> drop table if exists innodb_index_stats;

mysql> drop table if exists innodb_table_stats;

mysql> drop table if exists slave_master_info;

mysql> drop table if exists slave_relay_log_info;

mysql> drop table if exists slave_worker_info;

2.拷贝five-tables.sql到mysql服务器,并修改文件权限

[root@host01 db]# chown mysql:mysql five-tables.sql

3.关闭数据库

[mysql@host01 bin]$ ./mysqladmin -h localhost -u root -p -S /db/mysqlmha/data/mysql.sock shutdown

4.进入mysql数据库目录,删除表对应的文件

[mysql@host01 mysql]$ cd /db/mysqlmha/data/mysql

[mysql@host01 mysql]$ rm innodb_index_stats.ibd

[mysql@host01 mysql]$ rm innodb_table_stats.ibd

[mysql@host01 mysql]$ rm slave_master_info.ibd

[mysql@host01 mysql]$ rm slave_relay_log_info.ibd

[mysql@host01 mysql]$ rm slave_worker_info.ibd

5.启动数据库

[mysql@host01 bin]$ ./mysqld_safe --defaults-file=/db/mysqlmha/conf/my.cnf --user=mysql

6.执行创建这几个表的脚本

mysql> use mysql;

mysql> source /db/five-tables.sql

five-tables.sql文件内容:

/*

temporary fix for problem with windows installer for MySQL 5.6.10 on Windows 7 machines.

I did the procedure on a clean installed MySql, and it worked for me, at least it stopped

lines of innodb errors in the log and the use of transient innodb tables. So, do it at

your own risk..

1. drop these tables from mysql:

innodb_index_stats

innodb_table_stats

slave_master_info

slave_relay_log_info

slave_worker_info

2. delete all .frm & .ibd of the tables above.

3. run this file to recreate the tables above (source five-tables.sql).

4. restart mysqld.

Cheers,

CNL

*/

CREATE TABLE `innodb_index_stats` (

`database_name` varchar(64) COLLATE utf8_bin NOT NULL,

`table_name` varchar(64) COLLATE utf8_bin NOT NULL,

`index_name` varchar(64) COLLATE utf8_bin NOT NULL,

`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,

`stat_value` bigint(20) unsigned NOT NULL,

`sample_size` bigint(20) unsigned DEFAULT NULL,

`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,

PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

CREATE TABLE `innodb_table_stats` (

`database_name` varchar(64) COLLATE utf8_bin NOT NULL,

`table_name` varchar(64) COLLATE utf8_bin NOT NULL,

`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

`n_rows` bigint(20) unsigned NOT NULL,

`clustered_index_size` bigint(20) unsigned NOT NULL,

`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,

PRIMARY KEY (`database_name`,`table_name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

CREATE TABLE `slave_master_info` (

`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',

`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',

`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',

`Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'The host name of the master.',

`User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',

`User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',

`Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',

`Connect_retry` int(10) unsigned NOT NULL COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',

`Enabled_ssl` tinyint(1) NOT NULL COMMENT 'Indicates whether the server supports SSL connections.',

`Ssl_ca` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',

`Ssl_capath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',

`Ssl_cert` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',

`Ssl_cipher` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',

`Ssl_key` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',

`Ssl_verify_server_cert` tinyint(1) NOT NULL COMMENT 'Whether to verify the server certificate.',

`Heartbeat` float NOT NULL,

`Bind` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',

`Ignored_server_ids` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored, followed by the actual server IDs',

`Uuid` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',

`Retry_count` bigint(20) unsigned NOT NULL COMMENT 'Number of reconnect attempts, to the master, before giving up.',

`Ssl_crl` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',

`Ssl_crlpath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',

`Enabled_auto_position` tinyint(1) NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',

PRIMARY KEY (`Host`,`Port`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information';

CREATE TABLE `slave_relay_log_info` (

`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file or rows in the table. Used to version table definitions.',

`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the current relay log file.',

`Relay_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The relay log position of the last executed event.',

`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',

`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last executed event.',

`Sql_delay` int(11) NOT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',

`Number_of_workers` int(10) unsigned NOT NULL,

`Id` int(10) unsigned NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',

PRIMARY KEY (`Id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information';

CREATE TABLE `slave_worker_info` (

`Id` int(10) unsigned NOT NULL,

`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

`Relay_log_pos` bigint(20) unsigned NOT NULL,

`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

`Master_log_pos` bigint(20) unsigned NOT NULL,

`Checkpoint_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

`Checkpoint_relay_log_pos` bigint(20) unsigned NOT NULL,

`Checkpoint_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

`Checkpoint_master_log_pos` bigint(20) unsigned NOT NULL,

`Checkpoint_seqno` int(10) unsigned NOT NULL,

`Checkpoint_group_size` int(10) unsigned NOT NULL,

`Checkpoint_group_bitmap` blob NOT NULL,

PRIMARY KEY (`Id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information';

-- The End --

卸载mysql5.6.34_5.6.34版本安装后需要做的事项\mysql\.\innodb_table_stats\ not found.-hxl-ChinaUnix博客...相关推荐

  1. mysql 5.7.16默认密码_(转)Ubuntu16安装mysql5.7未提示输入密码,安装后修改mysql默认密码...

    Ubuntu16安装mysql5.7未提示输入密码,安装后修改mysql密码默认密码 mysql默认密码为空 但是使用mysql -uroot -p 命令连接mysql时,报错 ERROR 1045 ...

  2. Ubuntu18.04安装后要做的事

    Ubuntu18.04安装后要做的事 一.安装好第一件事:换源!! 按Windows键在搜索框中找到Software & Updates, 将源更新为阿里云的源. 在Other Softwar ...

  3. Ubuntu 11.04 安装后要做的20件事情

    作者:小肥肥 转自:http://blog.sina.com.cn/s/blog_5c9a54e30100r7yh.html 4.28日,Ubuntu11.04就发布了!Ubuntu 11.04 安装 ...

  4. Ubuntu18.04 安装后应该做的事(更新中)

    Ubuntu18.04 安装后应该做的事 1.更新源 找到Software & Updates,将源更新为阿里云的源 在Other Software里将Canonical Partners勾上 ...

  5. Fedora 安装后需要做的第一件事

    一直以来,Red Hat 系的许多教程,都会建议你关闭 SELinux.确实,启用 SELinux 可能会造成许多莫名其妙的错误.但在实际生产环境,甚至是用户工作站,Red Hat 都建议将 SELi ...

  6. mysql5.7.17的linux安装,linux下mysql5.7.17最新稳定版本安装教程

    通过源码在linux上安装mysql最新稳定版本:mysql-5.7.17 为了方便安装过程中不受boost依赖的影响,直接从官网下载mysql-boost-5.7.17.tar.gz版本.(官方解释 ...

  7. Ubuntu16.04安装后要做的一些事情

    转https://blog.csdn.net/huyuan7494/article/details/73741148?locationNum=1&fps=1 用了两周Ubuntu之后爱不释手, ...

  8. Ubuntu安装后需要做的事

    安装Ubuntu后需要做的那些事 前言 1.卸载系统不常用软件 2.更换系统源 3.安装Vim 4.安装谷歌拼音输入法 5.安装使用git 6.搭建py开发环境 7.搭建C/C++开发环境 前言 一般 ...

  9. 树莓派安装64位系统并且内网穿透搭建属于自己的博客

    一.材料准备 1.1)树莓派64位系统下载 树莓派64位系统下载地址 我这里准备的是无桌面Web增强版系统 1.2)内网穿透软件NPS下载 下载地址 1.3)Halo博客下载地址 下载地址 1.4)j ...

最新文章

  1. [js高手之路] 设计模式系列课程 - DOM迭代器(2)
  2. python入门之控制结构-循环结构_(一)Python入门-4控制语句:05while循环结构-死循环处理...
  3. mysql和SQLYog工具使用
  4. 根据awr报告查看最慢的sql语句
  5. python requests超时时间_python - requests 库 使用过程中timeout值最大可设值?
  6. SAP Spartacus org unit list点击item之后的页面跳转实现
  7. python写sql语句_简单的(笨的)用python以及SQL语句书写增删改查
  8. jmeter测试java服务_Jmeter 测试 JMS (Java Message Service)/ActiveMQ 性能
  9. spring mvc学习(9):路径参数
  10. 不容按钮、下拉框 执行同一个函数或者同一种函数的用法
  11. 宅男、游戏、美女,一场不一样的技术公开课让你老泪纵横
  12. 统计学习中常用的损失函数
  13. c++ primer打卡(三)
  14. asp.net 404页面
  15. strtolower
  16. 微信小程序-Testerhome
  17. gluster分布式存储总结与实践
  18. linux centos java kumo图片合成文字 词云插件 字体乱码问题
  19. Google Code Review最新指南
  20. 沈阳建筑学计算机专硕调剂,2020年沈阳建筑大学硕士研究生招生考试网上调剂公告...

热门文章

  1. Excel如何快速提取图片地址位置?
  2. android手机刷ios6,2017安卓手机刷机方法
  3. red and black trees(红黑二叉树)
  4. openwrt的两种固件类型:factory原厂固件、sysupgrade固件
  5. 这些例子感觉很实用,希望对你也有帮助
  6. Codeforces Round #807 (Div. 2) A-C题解
  7. Excel学习日记:L27-数据重复怎么办
  8. 【kindle资源】一本不得不读的投资经典《唐朝-手把手教你读财报》
  9. PDF转换器的使用步骤
  10. 汇编实现数字的输入与输出