Tag Info

Hot answers tagged

3

I don't see any option in pt-show-grants to do this kind of restriction. There are options for --only and --ignore specific users, but not tables. Nor is there an automatic option to ignore grants on nonexistant tables. I also glanced in the code, and it doesn't seem to break out the tables to scan through them for any reason. For what it's worth, I don't ...


3

The issue is that the replicas don't report their ports to the master. By default pt-table-checksum tries to connect by filling unknowns with defaults; if the unknowns aren't using defaults, this will fail. In this case, there are two options: 1) Use the --recursion-method option to change from inspecting SHOW PROCESSLIST to inspecting SHOW SLAVE HOSTS, ...


3

Here's a recent blog post (2013-07-01) that shows how to use tpcc-mysql and graph results: http://www.mysqlperformanceblog.com/2013/07/01/tpcc-mysql-simple-usage-steps-and-how-to-build-graphs-with-gnuplot/ This is written by Michael Rikmas, who is a super nice guy, and a long time Percona support engineer.


3

Yes, you can do this. pt-table-checksum --config FILENAME Where FILENAME looks like tables = table1,table2,table3 ignore-tables-regex = ^tmp chunk-time = .2 max-load = Threads_running=10 chunk-size = 100000 user = myuser pass = mypass If --config is not ...


3

The usual cause for this problem is that pt-table-sync is using CRC32 as a hash algorithm, because it's fast and cheap, but it can also give collisions. "codding" and "gnu" have the same crc32, for example. I recommend trying again with MD5 as the function.


2

The percona tools don't take the standard mysql client arguments. You need to specify a DSN in their format. See http://www.percona.com/doc/percona-toolkit/2.0/pt-table-checksum.html#dsn-options You'll want something like pt-table-checksum h=myhost,u=user,p=pass,P=port Personally I don't like putting credentials in something that will show up in the ...


2

You say you are using pt-table-checksum 2.0.1. I would recommend updating to 2.1, as there are many improvements in the tool. Next, let me address your test. You say the slave was not updated after the first or second commands that you ran. The second command looks to be trying to connect directly to the slave. pt-table-checksum won't report any ...


2

You're incorrect. It only runs the checksums on the master, not on the slaves. Example query run: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT 'db', 'table', '1', NULL, NULL, NULL, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `field1`, `field2`, ...


2

You should be able to shell script such automation I posted a shell script I use to automate mk-table-checksum and mk-table-sync : Fixing tables out of sync as reported by pt-table-checksum, pt-table-sync is not working (Dec 5, 2011) The script does the following: accepts the IP addresses of Master and Slave as command-line parameters retrieve the list ...


2

You could try: Checking the MySQL error log after you attempt the sync. It may reveal some consistency issues with the table that you weren't aware of Working around this table for now (using --exclude-table), and then coming back to it later Trying different combinations of checksum options (--algorithms, --chunk-size) for the problem table - this might ...


2

The chief reason to use --apply-log until the time of restore is to support incremental backups. If you make incremental backups, you would use --apply-log --redo-only each incremental backup, and then just before you restore, you do a final prepare with --apply-log. Otherwise if you don't make incremental backups, there's no reason not to do --apply-log ...


2

I think a chunk is a set number of rows to be scanned and checksummed. I never did like chunks because if the table order matters, each chunk could be completely different if just one row was written ahead or behind another. Try not setting a chunk size and see if the entire table is checksummed as a whole as a opposed to each chunk checksum. You can also ...


1

Don't worry, your situation is not unique. I encountered the exact same problem with mk-table-checksum years ago (See my Nov 16, 2012 post Maatkit shows the MySQL replication error in one table, but won't fix it) Here is something frightening from the MySQL Documentation on CHECKSUM TABLE The checksum value depends on the table row format. If the ...


1

PURE OPERATIONAL STANDPOINT You need to decide which protocol works best for you PLAN A : AFTER DUMP Run --apply-log immediately after backup, and you would have the most currently full backup. You would not have to spend your recovery time applying applying logs at the time of a restore (especially at an actual disaster recovery event). Thus, recovery ...


1

You should enable slow-query-log and log-queries-not-using-indexes to in order to manifest what queries are skipping on the indexes. This is just a personal preference, but I usually the --processlist option of mk-query-digest. I wrote a automation script for it long ago : MySQL general query log performance effects based on Percona's video about ...


1

According to the Documentation on --recursion-method Preferred recursion method for discovering replicas. Possible methods are: METHOD USES =========== ================== processlist SHOW PROCESSLIST hosts SHOW SLAVE HOSTS dsn=DSN DSNs from a table The processlist method is the default, because SHOW SLAVE HOSTS is not ...


1

I searched around Google, and I'll admit, it's tough to find any documentation. You can try these links Download Site Clustrix tpcc-mysql Benchmark Full Search within Percona's Website I also recommend reading the README file when you download and install it. Perhaps the README file will give you some guidance on getting proper documentation.


1

By default, pt-table-checksum displays as result all tables even if there is no error or diffs. If you want to display just errors and diffs you can add the --quiet to the invocation of pt-table-checksum Print only the most important information (disables --progress). Specifying this option once causes the tool to print only errors, warnings, and tables ...


1

I don't see anything along those lines in the Percona Toolkit Documentation. There is something you can do to cheat Scenario datadir is /var/lib/mysql Master has test database Slave has test_slave database You could create a symbolic link in one of two ways TECHNIQUE #1 On the Master, run ln -s /var/lib/mysql/test /var/lib/mysql/test_slave chown ...


1

Just reading your question and without any additional details, I worry about you not having any form of High Availability or DB Clustering. At the very least, you should set up MySQL Replication using a commodity server as the Slave. With 1.4GB of total data, you could do many different things: From the Slave, perform a single transaction mysqldump ...


1

Disclaimer: I work for Percona and am one of the Percona XtraBackup developers. You'd need to try the options and see what works best for you. Given your needs I'd evaluate Percona XtraBackup first. It will perform the full and incremental hot backups just fine. In fact, Zmanda Recovery Manager uses Percona XtraBackup as its backend for the hot InnoDB ...


1

pt-table-checksum runs on the master primarily, but as binary logging on MySQL is statement based, the actual calculation statements are being executed on the slave as well. One should then run pt-table-checksum on the slave to check and compare the checksums it can't access the slave from the master. Add the --replicate-check-only option to have it only ...


1

You will need to run pt-table-sync like this pt-table-sync --print Run this against all tables that have differences and redirect output to a text file. This will show what SQL has to be executed on the Slave to sync its contents with that of the Master. If any output is generated, it will be an entire row replacement (using REPLACE (SQL)) rather than ...


1

You need to use a mysql user that has permissions from the host your executing the script from. Run select user, host from mysql.user on the database to see if your user has an entry for the IP you're connecting from. If not, you will have to grant permissions to the user for that host.


1

In order to do rate limiting the script will need to connect to each of the slaves to look at the slave status. Make sure you have the same username, password, grants for this user on the master and all slaves. Ensure you can connect to the slaves via mysql client on the master. If you can but the tool still cannot for some reason first run export ...



Only top voted, non community-wiki answers of a minimum length are eligible