小编Lar*_*ars的帖子

InnoDB Master-Master 复制在断电测试后变得不一致

下午各位大佬

我目前正在使用 InnoDB 作为数据库引擎对 Master-Master 复制设置进行压力测试。

我们正在使用这个简单的脚本来测试我们从远程服务器在 Linux CLI 中运行的脚本。

<?php

while(true) {
    try {
        $conn = mysql_connect('10.0.10.210', 'test', 'test');
        if ($conn) {
            mysql_select_db('testdb');
            $random = rand(0, 1000);
            $res = mysql_query("INSERT INTO test VALUES(0, 'test',    $random)");
            if ($res) {
                echo "\n inserted " . microtime();
            } else {
                echo "\n not inserted " . microtime();
            }
            mysql_close($conn);
        } else {
            echo "\n can not connect";
        }
    } catch (Exception $ex) {
        echo "\n can not insert"  . microtime();
    }
} …
Run Code Online (Sandbox Code Playgroud)

mysql innodb replication php failover

6
推荐指数
1
解决办法
2059
查看次数

标签 统计

failover ×1

innodb ×1

mysql ×1

php ×1

replication ×1