Tag Info

Hot answers tagged

4

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

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 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 ...


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

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

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 ...


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

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 ...


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

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 ...


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

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 ...


2

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 ...


2

Check the log, a bit above the error: InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! It is trying to create new innodb files because they are not found. You need to decompress the files before applying the log: innobackupex --decompress /... Then, apply the log. BTW, you do not need to specify ...


2

Does it still fail to work if you omit --sample? (from manual) Also note that pt-query-digest may fail to report the database for queries when parsing tcpdump output. The database is discovered only in the initial connect events for a new client or when is executed. If the tcpdump output contains neither of these, then pt-query-digest cannot ...


2

I have a similar problem. I have missing tables and missing USE statments as well. Sometimes the USE statement is present but with the wrong database. I use a quite simple workaround. (Prelude) My first issue : my slow.log is 60Go long so I split it with split with option -l set to 20 millions (that gives me roughly 1Go per file) make sure you do not have ...


2

What we ended up doing is grepping out queries from the slow.log based on table name into database-specific (raw) log files. Then we specified --type rawlog and --database with pt-upgrade.


2

In order to take the backup of MySQL Server Objects i.e routines / triggers / events you can do like below mysqldump -h$MySQLHost -u$YourUser -p$YourPassword --no-data --no-create-info --routines --triggers --events $Database > MySQLStoredProcedures.sql The above will backup only the database objects , no data , no create table etc.


2

XtraBackup logs the most recent LSN not only in xtrabackup_info which you'll have to extract, but to STDERR, too: 150731 16:33:28 innobackupex: Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS... 150731 16:33:28 innobackupex: Waiting for log copying to finish xtrabackup: The latest check point (for incremental): '1948062848' xtrabackup: Stopping log ...


1

pt-online-schema-change takes advantage of the consistency nature of relational databases at table level. Let's see what happens when we write to the original table, one of three cases: The chunk has already been copied. No problem, the trigger will overwrite the values of the accessory table within the transaction The chunk has not yet been copied. The ...


1

DISKSPACE FOR EVERYTHING INNODB SELECT FORMAT(SUM(data_length+index_length)/POWER(1024,3),2) InnoDB_DiskSpace FROM information_schema.tables WHERE engine='InnoDB'; DISKSPACE FOR DATABASE mydb BY TABLE SELECT IFNULL(tbl,'Total') table_name, FORMAT(SUM(table_bytes)/POWER(1024,3),2) table_size FROM ( SELECT table_name ...


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

As the manual says: this option stops the slave SQL thread and wait to start backing up until Slave_open_temp_tables in SHOW STATUS is zero. [...] the SQL thread will be started and stopped until there are no open temporary tables The reason for this is because Percona Xtrabackup basically mimics a controlled crash/shutdown of the server, and temporary ...


1

If I'm not mistaken the pt-table-checksum uses report_host value to find slaves. May I suggest: stop slave2. Note its current position. Temporarily set up slave2 to replicate slave1 (binglog needs to be enabled on slave1) Start only the io thread to get replication chain (i.e. start slave io_thread;) Run pt-table-checksum from slave1 After check is done, ...


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

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

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 ...



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