MySQL innodb 中所有数据库的校验和
Checksum of all the database in MySQL innodb
我正在寻找一种方法来获取整个当前数据库的校验和。我发现:MySQL documentation : CHECKSUM TABLE Syntax。听起来几乎是我要找的东西,但它只是一个 table,我想在整个数据库上执行它。
我尝试了以下方法以应用于所有 table,但它不起作用(我认为这是 CHECKSUM TABLE
的错误用法)。
CHECKSUM TABLE (
SELECT table_name FROM information_schema.tables
WHERE table_schema = database()
);
有没有办法对整个数据库进行校验和?
https://www.percona.com/doc/percona-toolkit/2.0/pt-table-checksum.html--
pt-table-checksum performs an online replication consistency check by
executing checksum queries on the master, which produces different
results on replicas that are inconsistent with the master. The
optional DSN specifies the master host. The tool’s exit status is
nonzero if any differences are found, or if any warnings or errors
occur.
The following command will connect to the replication master on
localhost, checksum every table, and report the results on every
detected replica
我正在寻找一种方法来获取整个当前数据库的校验和。我发现:MySQL documentation : CHECKSUM TABLE Syntax。听起来几乎是我要找的东西,但它只是一个 table,我想在整个数据库上执行它。
我尝试了以下方法以应用于所有 table,但它不起作用(我认为这是 CHECKSUM TABLE
的错误用法)。
CHECKSUM TABLE (
SELECT table_name FROM information_schema.tables
WHERE table_schema = database()
);
有没有办法对整个数据库进行校验和?
https://www.percona.com/doc/percona-toolkit/2.0/pt-table-checksum.html--
pt-table-checksum performs an online replication consistency check by executing checksum queries on the master, which produces different results on replicas that are inconsistent with the master. The optional DSN specifies the master host. The tool’s exit status is nonzero if any differences are found, or if any warnings or errors occur.
The following command will connect to the replication master on localhost, checksum every table, and report the results on every detected replica