随笔分类 - mysql
摘要:主库上创建一个管理员账号grant all on *.* to admin@'%' identified by 'mysql'; /opt/percona-toolkit-3.1.0/bin/pt-table-checksum --socket=/opt/mysql5727/mysql.sock -
阅读全文
摘要:会话级SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; 全局SE
阅读全文
摘要:机房停电,mysql启动后发现从库报错误: Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication
阅读全文
摘要:[root@localhost soft]# curl -s get.dbsake.net > dbsake[root@localhost soft]# chmod u+x dbsake[root@localhost db_queueflow]# /soft/dbsake frmdump /home
阅读全文
摘要:环境:OS:Centos 7DB:5.6.40 数据库报如下的错误 2021-09-24 14:40:00 7fda204c5700 InnoDB: Error: Tablespace for table "mysql"."innodb_table_stats" is missing. 2021-0
阅读全文
摘要:1.查看安装的clickhouse[root@localhost clickhouse]# rpm -qa|grep clickhouseclickhouse-server-common-20.8.3.18-1.el7.x86_64clickhouse-common-static-20.8.3.18
阅读全文
摘要:环境:主库数据库版本:5.6.40从库数据库版本:5.7.29主库:192.168.1.85从库:192.168.1.118 主库 1.主库已经安装mysql,并启动root账号启动/opt/mysql5640/bin/mysqld_safe --defaults-file=/opt/mysql56
阅读全文
摘要:环境:OS:Centos 7mysql:5.6.40部署机器:192.168.1.14 背景说明:线上对一个大表执行了语句insert into a select * from b,b表数据2000多万的记录,导致binlog远远超过了max_binlog_size设定的值(大事物不会根据设置的值进
阅读全文
摘要:mysql版本: 5.7.29 大量的日志2021-08-13T00:59:23.099878Z 0 [Warning] InnoDB: A long semaphore wait:--Thread 139974037272320 has waited at srv0srv.cc line 1989
阅读全文
摘要:mysql版本:5.7.29 今天在导入大数据的dump文件的时候,数据库自动重启,查看错误日志如下: 2021-08-12T01:51:52.625334Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4690ms. The s
阅读全文
摘要:环境: OS:Centos 7 DB:mysql 5.6 尝试修改mysql最大连接数,发现不生效 配置文件设置的是1024 max_connections=1024 重启发现最大连接数是214 解决办法: 1.修改limits.conf文件 [root@foreman ~]# more /etc/
阅读全文
摘要:MySQL主从切换 1.停止从服务器slave服务:mysql> stop slave2.将从服务器切换为主服务器,在从服务器上执行mysql> reset mastermysql> reset slave all;注:reset slave all 命令会删除从库的 replication 参数,
阅读全文
摘要:环境 OS:Centos 7 mysql:8.0.43 xtrabackup:8.0.35 glibc2.17版本 审计插件获取:Percona-Server-8.0.42-33-Linux.x86_64.glibc2.28-minimal.tar.gz 查看GLIBC库 [root@localho
阅读全文
摘要:1.输出binlog到文件mysqlbinlog --base64-output=decode-rows -v /home/mysql/binlog/binlog.000011>/tmp/aa.txt 2.查看某个pos后的多少行show binlog events IN 'binlog.00001
阅读全文
浙公网安备 33010602011771号