分类 MYSQL 下的文章

mysql 主从复制错误

Replica Errors During ReplicationIf a statement produces the same error (identical error code) on both the source and the replica, the error is logged, but replication continues.主从都出现相同的错误,同步继续If a statement produces different errors on the source and the replica, the replication SQL thread termi...

mysql 主从详细介绍

原理:Replication is based on the replication source server keeping track of all changes to its databases (updates, deletes, and so on) in its binary log. The binary log serves as a written record of all events that modify database structure or content (data) from the moment the server was started. ...

mysql 查看数据库表容量大小

1.查看所有数据库容量大小selecttable_schema as '数据库',sum(table_rows) as '记录数',sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)',sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'from information_schema.tablesgroup by table_schemaorder by sum(data_length) desc, sum(index_length) desc;  2.查看所有数据库各表容量大小...

mysql压测工具测试

mysql压测工具测试一、mysql自带压测工具mysqlslap1、更改其默认的最大连接数vi /etc/my.cnfmax_connections=20002、查看最大连接数show variables like '%max_connects%';3、进行压力测试mysqlslap --defaults-file=/etc/my.cnf \--concurrency=100,200 \ ---模拟两次读写并发,第一次100,第二次200--iterations=20 \ ---模拟查询...