Incorrect key file for table
收到报警,发现/目录满了,登上服务器一下 果然使用率99%,刚想看看是什么原因,发现/目录又自动恢复到28%查看error.log,发现是由于一条sql排序占用临时表导致空间上涨160621 14:54:55 [ERROR] /usr/sbin/mysqld: Incorrect key file for table '/tmp/#sql_1e4d_0.MYI'; try to repair it160621 14:54:55 [ERROR] Got a...
mysql 联合索引优化
explain select Fid from t_cyou_view_records where Fanchormasterid = 20237 and Froleid = 15081 and Fouttime is null order by Fentertime desc limit 1;+----+-------------+---------------------+------+---------------+------+---------+------+---------+-----------------------------+| id | select_t...
binlog_rows_query_log_events row模式下记录sql语句
mysql 5.7后通过设置binlog_rows_query_log_events为on,可以在binlog_format=row中记录执行的SQL语句。mysql> use mytest;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> update t1 set name='tt' wh...
innodb_log_file_size设置
innodb_log_file_size的大小设置将会影响MySQL数据库的写入性能,若设置的太小,会增加checkpoint写的次数,以下测试在MySQL5.7版本中的如何修改innodb_log_file_size[root@endb local]# mysqlWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.7.9-l...
MySQL OOM问题处理一则
一个游戏业务的mysql数据库,多台服务器上mysql服务被OOM,但OOM的原因是什么呢?其实导致OOM的直接原因并不复杂,就是因为服务器内存不足,内核需要回收内存,回收内存就是kill掉服务器上使用内存最多的程序,而mysql服务是使用内存最多,所以就OOM了。首先我们检查是什么原因导致内存不足,这台服务器物理内存为64G# ...
MySQL 5.7.9 安装
下载mysqlshell># wget http://cdn.mysql.com/Downloads/MySQL-5.7/mysql-5.7.9.tar.gzshell># ll-rw-r--r-- 1 root root 312845162 Nov 11 16:25 mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz-rw-r--r-- 1 root root 611640358 Nov 11 16:27 mysql-5.7.9-linux-glibc2...