ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corrupted
mysql ERROR 1548
ERROR 1577 (HY000): Cannot proceed because system tables used by Event Schedule
mysql> select *from information_schema.events;ERROR 1577 (HY000): Cannot proceed because system tables used by Event Scheduler were found damaged at server startmysql> show variables like 'event_scheduler';+-----------------+----------+| Variable...
mysql主从中,从和主数据相差较多
<div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;">mysql主从中,从和主数据相差较多</div><div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;"><br style="background-color:inherit...
[mysqld_safe] 中的参数使用mysqld_safe命令启动时不生效?
[mysqld_safe] 中的参数使用mysqld_safe命令启动时不生效?
max_connections
<div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;">当连接数超出了max_connections的时候,后台日志文件不会报错</div><div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;">连接的时...
mysqldump dump-slave
查看从库的状态,发现从库的sql_thread进程会自动停止,停止之后 又会自动开启,没有人操作这个库<br />苦苦找不到原因。<br />通过show full processlist查看进程时,发现有一个备份的进程在执行。<br />找到备份的脚本,加上crontab里的定时任务,发现原来是这个备份引起的。<br />备份的时候,使用了dump-slave选项...
Last_SQL_Error: Could not execute Update_rows event
<div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;"><span style="background-color:inherit;line-height:1.5;">踩吭:</span></div><div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;...
The incident LOST_EVENTS occured on the master
<span style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;background-color:#FFFFFF;"> Last_SQL_Error: The incident LOST_EVENTS occured on the master. Message: error writing to the binary log</span><div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14...
mysql event对主从的影响
<div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;"><span style="line-height:1.5;">event_scheduler对主从的影响:</span><br style="background-color:inherit;" /></div><div style="background-color:#FFFFFF;font-family:微软雅黑;font-size:14px...
对于innodb_file_per_table=off时,innodb引擎,误删除表的恢复
对于innodb_file_per_table=off时,innodb引擎,误删除表的恢复。<br /><br /><br />场景模拟:<br />mysql> show databases; <br />+--------------------+ <br />| Database | <br />+--------------------+ <br />| information_schema | <br />| d1 | <br />| mysql | ...
mysql数据恢复
书接上文,把未删除表数据也恢复出来:
未删除的表结构从ibdata1文件进行恢复
上节说到对于删除的表结构进行恢复,这次讲对于未删除的表结构进行恢复:
mysql 还原表的定义语句
还原表的定义语句:如果表被删除,可以使用下面的方法 找到表的定义语句:1 环境准备: mysql> create database db_song; Query OK, 1 row affected (0.24 sec) mysql> use db_song; Database changed mysql> create table t1(id int); Query OK, 0 rows affected (0.01 sec)...
mysqldump备份时使用single-transaction会不会加锁???
经常被讨论的一个话题:mysqldump备份时加single-transaction会不会加锁???通过根踪可以看到:8 Connect root@localhost on 8 Query /*!40100 SET @@SQL_MODE='' */ 8 Query /*!40103 SET TIME_ZONE='+00:00' */ 8 Query FLUSH /*!40101 LOCAL */ TABLES 8 Query ...
[ERROR] Slave I/O: Replication event checksum Error_code: 1743
[ERROR] Slave I/O: Replication event checksum verification failed while reading from network. Error_code: 1743的模拟:目前主从状态是正常的:mysql> show slave status\G*************************** 1. row ***************************  ...
read_only的影响范围
今天看到语句set global read_only=on; 以为这条语句只对设置变量之后的连接才有效果。 因为记得set global 就是只对本设置之后再次连接到数据库上的连接才有效,对于已经存在的连接,没有效果。 查看了一下文档: If you change a global system variable, the value is remembered and used for new ...
查询缓存(query_cache)的影响
查询缓存(query_cache)的影响:对读和写都有影响,因为1 读的时候要查看结果集是不是在query cache中,如果不在并且这个结果可以被缓存 要放入到 query cache中2 写入到某个表的时候,需要把这个表相关的query cache中记录都设为无效,如果缓存大或碎片多,那么会浪费时间查询缓存操作是一个排他操作,这个...
mysql绕过行触发器,实现语句触发器
mysql只有基于行的trigger,对于before trigger可以通过下面的方法 实现基于语句的trigger(只执行一次):因为基于before trigger 除了处理的第一条记录,别的row_count()都会返回1,但这并非真正意义上的单条sql语句的触发器。这可能是mysql 的一个bug, 有可能以后的版本中会没有这种情况,所以,用之前请先测试...
innodb索引的统计信息不存在物理存储上
innodb索引的统计信息不存在物理存储上innodb不在盘上存储索引的统计信息, 统计信息可以在information_schema.STATISTICS表中看到, 查看这个表的定义:mysql> show create table information_schema.STATISTICS;+------------+----------------------------------------------------------------------...
官方mysql中查看索引是否被使用到
官方mysql中查看索引是否被使用到:在percona版本或marida中可以通过 information_schea.index_statistics查看得到,在官方版本中如何查看呢?select object_type,object_schema,object_name,index_name,count_star,count_read,COUNT_FETCH from performance_schema.table_io_waits_summary_by_inde...