SSL Connection for pt-table-checksum not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Incomplete
|
Undecided
|
Carlos Salguero |
Bug Description
The problem appears to be that pt-table-check is not using the SSL settings from defaults file.
I am using my connection to the master host to demonstrate the problem. I am requiring SSL over a real IP, but not over localhost.
Base OS is CentOS 7 with MariaDB 10.1.26 (Upgraded with MariaDB's RPMs). All commands were run as root.
# pt-table-checksum --version
pt-table-checksum 3.0.4
FAILING CASE
============
with host=real.fqdn.com in /etc/percona-
# pt-table-checksum -F /etc/my.cnf.percona -t mysql.user
09-18T11:59:55 DBI connect(
Here we see that it is reading /etc/my.cnf.percona because it gets the username.
WORKING CASES
=============
Works with localhost (no encryption)
-------
with host=localhost in /etc/percona-
[root@real percona-toolkit]# pt-table-checksum -F /etc/my.cnf.percona -t mysql.user
Cannot connect to F=/etc/
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
09-18T12:05:09 0 0 11 1 0 0.009 mysql.user
Ignore the slave here (it is the same problem, but we can just use the local system). Username & Password are read from /etc/my.cnf.percona and it connects via localhost. Now to demonstrate that /etc/my.cnf.percona works:
MySQL Command line Client Works
-------
[root@real percona-toolkit]# mysql --defaults-
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10473
Server version: 10.1.26-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
[root@real percona-toolkit]# mysql --defaults-
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 72
Server version: 10.1.26-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
Original Setup without Encryption Worked
-------
I originally setup both master & slave without encryption and everything worked (without the REQUIRE x509 statement). I didn't see a need to add this to the report
GRANTS
======
GRANT REPLICATION SLAVE,PROCESS,
GRANT REPLICATION SLAVE,PROCESS,
GRANT ALL PRIVILEGES ON percona.* TO `ptcheck`@`%`;
GRANT ALL PRIVILEGES ON percona.* TO `ptcheck`
CONFIG FILES
============
[root@real percona-toolkit]# cat percona-
host=real.fqdn.com
#host=localhost -- used in 1st working example
port=3306
no-check-
[root@real percona-toolkit]# cat /etc/my.cnf.percona
[client]
user = ptcheck
password = "password"
port = 3306
ssl = 1
ssl-ca = /data/ca-cert.pem
ssl-cert = /data/cert.pem
ssl-key = /data/key.pem
ssl-cipher = AES128-SHA
RPMS
====
percona-
kernel-
MariaDB-
MariaDB-
MariaDB-
MariaDB-
perl-5.
perl-Carp-
perl-Compress-
perl-Compress-
perl-constant-
perl-Data-
perl-DBD-
perl-DBI-
perl-Digest-
perl-Digest-
perl-Digest-
perl-Digest-
perl-Encode-
perl-Error-
perl-Exporter-
perl-File-
perl-File-
perl-Filter-
perl-Getopt-
perl-Git-
perl-HTTP-
perl-IO-
perl-IO-
perl-IO-
perl-libs-
perl-macros-
perl-Net-
perl-Net-
perl-Net-
perl-Net-
perl-parent-
perl-PathTools-
perl-PlRPC-
perl-Pod-
perl-podlators-
perl-Pod-
perl-Pod-
perl-Pod-
perl-Scalar-
perl-Socket-
perl-Storable-
perl-TermReadKe
perl-Text-
perl-threads-
perl-threads-
perl-TimeDate-
perl-Time-
perl-Time-
DEBUG OUTPUT
============
[root@real percona-toolkit]# PTDEBUG=1 pt-table-checksum -F /etc/my.cnf.percona -t mysql.user
# /usr/bin/perl 5.016003
# Linux real.fqdn.com 3.10.0-
# Arguments: _[-F]_ _[/etc/
# OptionParser:1952 11394 Option rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
# OptionParser:1961 11394 =item --ask-pass
# OptionParser:1988 11394 Short help: Prompt for a password when connecting to MySQL
# OptionParser:1961 11394 =item --[no]check-
# OptionParser:1988 11394 Short help: Check that the binlog_format is the same on all servers
# OptionParser:1961 11394 =item --binary-index
# OptionParser:1980 11394 Option has no attributes
# OptionParser:1988 11394 Short help: This option modifies the behavior of --create-
# OptionParser:1961 11394 =item --check-interval
# OptionParser:1988 11394 Short help: Sleep time between checks for --max-lag
# OptionParser:1961 11394 =item --[no]check-plan
# OptionParser:1988 11394 Short help: Check query execution plans for safety
# OptionParser:1961 11394 =item --[no]check-
# OptionParser:1988 11394 Short help: Do not checksum if any replication filters are set on any replicas
# OptionParser:1961 11394 =item --check-slave-lag
# OptionParser:1988 11394 Short help: Pause checksumming until this replica's lag is less than --max-lag
# OptionParser:1961 11394 =item --[no]check-
# OptionParser:1988 11394 Short help: Checks that tables on slaves exist and have all the checksum --columns
# OptionParser:1961 11394 =item --chunk-index
# OptionParser:1988 11394 Short help: Prefer this index for chunking tables
# OptionParser:1961 11394 =item --chunk-
# OptionParser:1988 11394 Short help: Use only this many left-most columns of a --chunk-index
# OptionParser:1961 11394 =item --chunk-size
# OptionParser:1988 11394 Short help: Number of rows to select for each checksum query
# OptionParser:1961 11394 =item --chunk-size-limit
# OptionParser:1988 11394 Short help: Do not checksum chunks this much larger than the desired chunk size
# OptionParser:1961 11394 =item --chunk-time
# OptionParser:1988 11394 Short help: Adjust the chunk size dynamically so each checksum query takes this long to execute
# OptionParser:1961 11394 =item --columns
# OptionParser:1988 11394 Short help: Checksum only this comma-separated list of columns
# OptionParser:1961 11394 =item --config
# OptionParser:1988 11394 Short help: Read this comma-separated list of config files; if specified, this must be the first option on the command line
# OptionParser:1961 11394 =item --[no]create-
# OptionParser:1988 11394 Short help: Create the --replicate database and table if they do not exist
# OptionParser:1961 11394 =item --databases
# OptionParser:1988 11394 Short help: Only checksum this comma-separated list of databases
# OptionParser:1961 11394 =item --databases-regex
# OptionParser:1988 11394 Short help: Only checksum databases whose names match this Perl regex
# OptionParser:1961 11394 =item --defaults-file
# OptionParser:1988 11394 Short help: Only read mysql options from the given file
# OptionParser:1961 11394 =item --[no]empty-
# OptionParser:1988 11394 Short help: Delete previous checksums for each table before checksumming the table
# OptionParser:1961 11394 =item --engines
# OptionParser:1988 11394 Short help: Only checksum tables which use these storage engines
# OptionParser:1961 11394 =item --explain
# OptionParser:1988 11394 Short help: Show, but do not execute, checksum queries (disables --[no]empty-
# OptionParser:1961 11394 =item --float-precision
# OptionParser:1988 11394 Short help: Precision for FLOAT and DOUBLE number-to-string conversion
# OptionParser:1961 11394 =item --function
# OptionParser:1988 11394 Short help: Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc)
# OptionParser:1961 11394 =item --help
# OptionParser:1988 11394 Short help: Show help and exit
# OptionParser:1961 11394 =item --host
# OptionParser:1988 11394 Short help: Host to connect to
# OptionParser:1961 11394 =item --ignore-columns
# OptionParser:1988 11394 Short help: Ignore this comma-separated list of columns when calculating the checksum
# OptionParser:1961 11394 =item --ignore-databases
# OptionParser:1988 11394 Short help: Ignore this comma-separated list of databases
# OptionParser:1961 11394 =item --ignore-
# OptionParser:1988 11394 Short help: Ignore databases whose names match this Perl regex
# OptionParser:1961 11394 =item --ignore-engines
# OptionParser:1988 11394 Short help: Ignore this comma-separated list of storage engines
# OptionParser:1961 11394 =item --ignore-tables
# OptionParser:1988 11394 Short help: Ignore this comma-separated list of tables
# OptionParser:1961 11394 =item --ignore-
# OptionParser:1988 11394 Short help: Ignore tables whose names match the Perl regex
# OptionParser:1961 11394 =item --max-lag
# OptionParser:1988 11394 Short help: Pause checksumming until all replicas' lag is less than this value
# OptionParser:1961 11394 =item --max-load
# OptionParser:1988 11394 Short help: Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than the threshold
# OptionParser:1961 11394 =item --password
# OptionParser:1988 11394 Short help: Password to use when connecting
# OptionParser:1961 11394 =item --pause-file
# OptionParser:1988 11394 Short help: Execution will be paused while the file specified by this param exists
# OptionParser:1961 11394 =item --pid
# OptionParser:1988 11394 Short help: Create the given PID file
# OptionParser:1961 11394 =item --plugin
# OptionParser:1988 11394 Short help: Perl module file that defines a pt_table_
# OptionParser:1961 11394 =item --port
# OptionParser:1988 11394 Short help: Port number to use for connection
# OptionParser:1961 11394 =item --progress
# OptionParser:1988 11394 Short help: Print progress reports to STDERR
# OptionParser:1961 11394 =item --quiet
# OptionParser:1988 11394 Short help: Print only the most important information (disables --progress)
# OptionParser:1961 11394 =item --recurse
# OptionParser:1988 11394 Short help: Number of levels to recurse in the hierarchy when discovering replicas
# OptionParser:1961 11394 =item --recursion-method
# OptionParser:1988 11394 Short help: Preferred recursion method for discovering replicas. pt-table-checksum performs several REPLICA CHECKS before and while running
# OptionParser:1961 11394 =item --replicate
# OptionParser:1988 11394 Short help: Write checksum results to this table
# OptionParser:1961 11394 =item --[no]replicate
# OptionParser:1988 11394 Short help: Check replicas for data differences after finishing each table
# OptionParser:1961 11394 =item --replicate-
# OptionParser:1980 11394 Option has no attributes
# OptionParser:1988 11394 Short help: Check replicas for consistency without executing checksum queries
# OptionParser:1961 11394 =item --replicate-
# OptionParser:1988 11394 Short help: Retry checksum comparison this many times when a difference is encountered
# OptionParser:1961 11394 =item --replicate-
# OptionParser:1988 11394 Short help: USE only this database
# OptionParser:1961 11394 =item --resume
# OptionParser:1980 11394 Option has no attributes
# OptionParser:1988 11394 Short help: Resume checksumming from the last completed chunk (disables --[no]empty-
# OptionParser:1961 11394 =item --retries
# OptionParser:1988 11394 Short help: Retry a chunk this many times when there is a nonfatal error
# OptionParser:1961 11394 =item --run-time
# OptionParser:1988 11394 Short help: How long to run
# OptionParser:1961 11394 =item --separator
# OptionParser:1988 11394 Short help: The separator character used for CONCAT_WS()
# OptionParser:1961 11394 =item --skip-
# OptionParser:1988 11394 Short help: DSN to skip when checking slave lag
# OptionParser:1961 11394 =item --slave-user
# OptionParser:1988 11394 Short help: Sets the user to be used to connect to the slaves
# OptionParser:1961 11394 =item --slave-password
# OptionParser:1988 11394 Short help: Sets the password to be used to connect to the slaves
# OptionParser:1961 11394 =item --set-vars
# OptionParser:1988 11394 Short help: Set the MySQL variables in this comma-separated list of variable=value pairs
# OptionParser:1961 11394 =item --socket
# OptionParser:1988 11394 Short help: Socket file to use for connection
# OptionParser:1961 11394 =item --slave-
# OptionParser:1988 11394 Short help: When a master table is marked to be checksumed in only one chunk but a slave table exceeds the maximum accepted size for this, the table is skipped
# OptionParser:1961 11394 =item --tables
# OptionParser:1988 11394 Short help: Checksum only this comma-separated list of tables
# OptionParser:1961 11394 =item --tables-regex
# OptionParser:1988 11394 Short help: Checksum only tables whose names match this Perl regex
# OptionParser:1961 11394 =item --trim
# OptionParser:1980 11394 Option has no attributes
# OptionParser:1988 11394 Short help: Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0)
# OptionParser:1961 11394 =item --truncate-
# OptionParser:1980 11394 Option has no attributes
# OptionParser:1988 11394 Short help: Truncate the replicate table before starting the checksum
# OptionParser:1961 11394 =item --user
# OptionParser:1988 11394 Short help: User for login if not current user
# OptionParser:1961 11394 =item --version
# OptionParser:1988 11394 Short help: Show version and exit
# OptionParser:1961 11394 =item --[no]version-check
# OptionParser:1988 11394 Short help: Check for the latest version of Percona Toolkit, MySQL, and other programs
# OptionParser:1961 11394 =item --where
# OptionParser:1988 11394 Short help: Do only rows matching this WHERE clause
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => ask-pass desc => Prompt for a password when connecting to MySQL attributes => HASH(0x1f88da8)
# OptionParser:2067 11394 ask-pass type: undef
# OptionParser:2028 11394 Parsing opt spec: group => default spec => check-binlog-
# OptionParser:2067 11394 check-binlog-format type: undef
# OptionParser:2074 11394 check-binlog-format default: yes
# OptionParser:2028 11394 Parsing opt spec: group => default spec => binary-index desc => This option modifies the behavior of --create-
# OptionParser:2067 11394 binary-index type: undef
# OptionParser:2028 11394 Parsing opt spec: group => Throttle spec => check-interval=m desc => Sleep time between checks for --max-lag (default 1) attributes => HASH(0x297f4e8)
# OptionParser:2067 11394 check-interval type: m
# OptionParser:2074 11394 check-interval default: 1
# OptionParser:2028 11394 Parsing opt spec: group => default spec => check-plan! desc => Check query execution plans for safety (default yes) attributes => HASH(0x297f3f8)
# OptionParser:2067 11394 check-plan type: undef
# OptionParser:2074 11394 check-plan default: yes
# OptionParser:2028 11394 Parsing opt spec: group => Safety spec => check-replicati
# OptionParser:2067 11394 check-replicati
# OptionParser:2074 11394 check-replicati
# OptionParser:2028 11394 Parsing opt spec: group => Throttle spec => check-slave-lag=s desc => Pause checksumming until this replica's lag is less than --max-lag attributes => HASH(0x297c828)
# OptionParser:2067 11394 check-slave-lag type: s
# OptionParser:2028 11394 Parsing opt spec: group => Safety spec => check-slave-tables! desc => Checks that tables on slaves exist and have all the checksum --columns (default yes) attributes => HASH(0x297c750)
# OptionParser:2067 11394 check-slave-tables type: undef
# OptionParser:2074 11394 check-slave-tables default: yes
# OptionParser:2028 11394 Parsing opt spec: group => default spec => chunk-index=s desc => Prefer this index for chunking tables attributes => HASH(0x297c660)
# OptionParser:2067 11394 chunk-index type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => chunk-index-
# OptionParser:2067 11394 chunk-index-columns type: i
# OptionParser:2028 11394 Parsing opt spec: group => default spec => chunk-size=z desc => Number of rows to select for each checksum query (default 1000) attributes => HASH(0x297c4e0)
# OptionParser:2067 11394 chunk-size type: z
# OptionParser:2074 11394 chunk-size default: 1000
# OptionParser:2028 11394 Parsing opt spec: group => Safety spec => chunk-size-limit=f desc => Do not checksum chunks this much larger than the desired chunk size (default 2.0) attributes => HASH(0x297c408)
# OptionParser:2067 11394 chunk-size-limit type: f
# OptionParser:2074 11394 chunk-size-limit default: 2.0
# OptionParser:2028 11394 Parsing opt spec: group => default spec => chunk-time=f desc => Adjust the chunk size dynamically so each checksum query takes this long to execute (default 0.5) attributes => HASH(0x297c318)
# OptionParser:2067 11394 chunk-time type: f
# OptionParser:2074 11394 chunk-time default: 0.5
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => columns|c=a desc => Checksum only this comma-separated list of columns attributes => HASH(0x297c240)
# OptionParser:2067 11394 columns type: a
# OptionParser:2028 11394 Parsing opt spec: group => Config spec => config=A desc => Read this comma-separated list of config files; if specified, this must be the first option on the command line attributes => HASH(0x297c150)
# OptionParser:2067 11394 config type: A
# OptionParser:2028 11394 Parsing opt spec: group => default spec => create-
# OptionParser:2067 11394 create-
# OptionParser:2074 11394 create-
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => databases|d=h desc => Only checksum this comma-separated list of databases attributes => HASH(0x297bfa0)
# OptionParser:2067 11394 databases type: h
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => databases-regex=s desc => Only checksum databases whose names match this Perl regex attributes => HASH(0x297beb0)
# OptionParser:2067 11394 databases-regex type: s
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => defaults-file|F=s desc => Only read mysql options from the given file attributes => HASH(0x297bdd8)
# OptionParser:2067 11394 defaults-file type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => empty-replicate
# OptionParser:2067 11394 empty-replicate
# OptionParser:2074 11394 empty-replicate
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => engines|e=h desc => Only checksum tables which use these storage engines attributes => HASH(0x2969150)
# OptionParser:2067 11394 engines type: h
# OptionParser:2028 11394 Parsing opt spec: group => Output spec => explain+ desc => Show, but do not execute, checksum queries (disables --[no]empty-
# OptionParser:2067 11394 explain type: undef
# OptionParser:2074 11394 explain default: 0
# OptionParser:2083 11394 Deferring check of disables rule for HASH(0x2969270) disables --[no]empty-
# OptionParser:2028 11394 Parsing opt spec: group => default spec => float-precision=i desc => Precision for FLOAT and DOUBLE number-to-string conversion attributes => HASH(0x2969138)
# OptionParser:2067 11394 float-precision type: i
# OptionParser:2028 11394 Parsing opt spec: group => default spec => function=s desc => Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc) attributes => HASH(0x29690c0)
# OptionParser:2067 11394 function type: s
# OptionParser:2028 11394 Parsing opt spec: group => Help spec => help desc => Show help and exit attributes => HASH(0x29690a8)
# OptionParser:2067 11394 help type: undef
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => host|h=s desc => Host to connect to (default localhost) attributes => HASH(0x2824f08)
# OptionParser:2067 11394 host type: s
# OptionParser:2074 11394 host default: localhost
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-columns=H desc => Ignore this comma-separated list of columns when calculating the checksum attributes => HASH(0x2824b78)
# OptionParser:2067 11394 ignore-columns type: H
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-databases=H desc => Ignore this comma-separated list of databases attributes => HASH(0x2663fb0)
# OptionParser:2067 11394 ignore-databases type: H
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-
# OptionParser:2067 11394 ignore-
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-engines=H desc => Ignore this comma-separated list of storage engines (default FEDERATED,
# OptionParser:2067 11394 ignore-engines type: H
# OptionParser:2074 11394 ignore-engines default: FEDERATED,
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-tables=H desc => Ignore this comma-separated list of tables attributes => HASH(0x285c070)
# OptionParser:2067 11394 ignore-tables type: H
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-
# OptionParser:2067 11394 ignore-tables-regex type: s
# OptionParser:2028 11394 Parsing opt spec: group => Throttle spec => max-lag=m desc => Pause checksumming until all replicas' lag is less than this value (default 1s) attributes => HASH(0x285c220)
# OptionParser:2067 11394 max-lag type: m
# OptionParser:2074 11394 max-lag default: 1s
# OptionParser:2028 11394 Parsing opt spec: group => Throttle spec => max-load=A desc => Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than the threshold (default Threads_running=25) attributes => HASH(0x285c310)
# OptionParser:2067 11394 max-load type: A
# OptionParser:2074 11394 max-load default: Threads_running=25
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => password|p=s desc => Password to use when connecting attributes => HASH(0x285c400)
# OptionParser:2067 11394 password type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => pause-file=s desc => Execution will be paused while the file specified by this param exists attributes => HASH(0x285c4f0)
# OptionParser:2067 11394 pause-file type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => pid=s desc => Create the given PID file attributes => HASH(0x285c5b0)
# OptionParser:2067 11394 pid type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => plugin=s desc => Perl module file that defines a pt_table_
# OptionParser:2067 11394 plugin type: s
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => port|P=i desc => Port number to use for connection attributes => HASH(0x285c778)
# OptionParser:2067 11394 port type: i
# OptionParser:2028 11394 Parsing opt spec: group => default spec => progress=a desc => Print progress reports to STDERR (default time,30) attributes => HASH(0x285c868)
# OptionParser:2067 11394 progress type: a
# OptionParser:2074 11394 progress default: time,30
# OptionParser:2028 11394 Parsing opt spec: group => default spec => quiet|q+ desc => Print only the most important information (disables --progress) (default 0) attributes => HASH(0x285c940)
# OptionParser:2067 11394 quiet type: undef
# OptionParser:2074 11394 quiet default: 0
# OptionParser:2083 11394 Deferring check of disables rule for HASH(0x285c8e0) disables --progress) (default 0)
# OptionParser:2028 11394 Parsing opt spec: group => default spec => recurse=i desc => Number of levels to recurse in the hierarchy when discovering replicas attributes => HASH(0x2977e18)
# OptionParser:2067 11394 recurse type: i
# OptionParser:2028 11394 Parsing opt spec: group => default spec => recursion-method=a desc => Preferred recursion method for discovering replicas. pt-table-checksum performs several REPLICA CHECKS before and while running (default processlist,hosts) attributes => HASH(0x2977ed8)
# OptionParser:2067 11394 recursion-method type: a
# OptionParser:2074 11394 recursion-method default: processlist,hosts
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate=s desc => Write checksum results to this table (default percona.checksums) attributes => HASH(0x2977fb0)
# OptionParser:2067 11394 replicate type: s
# OptionParser:2074 11394 replicate default: percona.checksums
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-check! desc => Check replicas for data differences after finishing each table (default yes) attributes => HASH(0x2978088)
# OptionParser:2067 11394 replicate-check type: undef
# OptionParser:2074 11394 replicate-check default: yes
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-
# OptionParser:2067 11394 replicate-
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-
# OptionParser:2067 11394 replicate-
# OptionParser:2074 11394 replicate-
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-
# OptionParser:2067 11394 replicate-database type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => resume desc => Resume checksumming from the last completed chunk (disables --[no]empty-
# OptionParser:2067 11394 resume type: undef
# OptionParser:2083 11394 Deferring check of disables rule for HASH(0x297bd60) disables --[no]empty-
# OptionParser:2028 11394 Parsing opt spec: group => default spec => retries=i desc => Retry a chunk this many times when there is a nonfatal error (default 2) attributes => HASH(0x29e95d8)
# OptionParser:2067 11394 retries type: i
# OptionParser:2074 11394 retries default: 2
# OptionParser:2028 11394 Parsing opt spec: group => default spec => run-time=m desc => How long to run attributes => HASH(0x29e96b0)
# OptionParser:2067 11394 run-time type: m
# OptionParser:2028 11394 Parsing opt spec: group => default spec => separator=s desc => The separator character used for CONCAT_WS() (default #) attributes => HASH(0x29e9770)
# OptionParser:2067 11394 separator type: s
# OptionParser:2074 11394 separator default: #
# OptionParser:2028 11394 Parsing opt spec: group => default spec => skip-check-
# OptionParser:2067 11394 skip-check-
# OptionParser:2028 11394 Parsing opt spec: group => default spec => slave-user=s desc => Sets the user to be used to connect to the slaves attributes => HASH(0x29e9920)
# OptionParser:2067 11394 slave-user type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => slave-password=s desc => Sets the password to be used to connect to the slaves attributes => HASH(0x29e99e0)
# OptionParser:2067 11394 slave-password type: s
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => set-vars=A desc => Set the MySQL variables in this comma-separated list of variable=value pairs attributes => HASH(0x29e9aa0)
# OptionParser:2067 11394 set-vars type: A
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => socket|S=s desc => Socket file to use for connection attributes => HASH(0x29e9b78)
# OptionParser:2067 11394 socket type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => slave-skip-
# OptionParser:2067 11394 slave-skip-
# OptionParser:2074 11394 slave-skip-
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => tables|t=h desc => Checksum only this comma-separated list of tables attributes => HASH(0x29e9d40)
# OptionParser:2067 11394 tables type: h
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => tables-regex=s desc => Checksum only tables whose names match this Perl regex attributes => HASH(0x29e9e30)
# OptionParser:2067 11394 tables-regex type: s
# OptionParser:2028 11394 Parsing opt spec: group => default spec => trim desc => Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0) attributes => HASH(0x29e9f08)
# OptionParser:2067 11394 trim type: undef
# OptionParser:2028 11394 Parsing opt spec: group => default spec => truncate-
# OptionParser:2067 11394 truncate-
# OptionParser:2028 11394 Parsing opt spec: group => Connection spec => user|u=s desc => User for login if not current user attributes => HASH(0x29ea058)
# OptionParser:2067 11394 user type: s
# OptionParser:2028 11394 Parsing opt spec: group => Help spec => version desc => Show version and exit attributes => HASH(0x29ea148)
# OptionParser:2067 11394 version type: undef
# OptionParser:2028 11394 Parsing opt spec: group => default spec => version-check! desc => Check for the latest version of Percona Toolkit, MySQL, and other programs (default yes) attributes => HASH(0x29ea208)
# OptionParser:2067 11394 version-check type: undef
# OptionParser:2074 11394 version-check default: yes
# OptionParser:2028 11394 Parsing opt spec: group => default spec => where=s desc => Do only rows matching this WHERE clause attributes => HASH(0x29fce88)
# OptionParser:2067 11394 where type: s
# OptionParser:2089 11394 Parsing rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
# OptionParser:2145 11394 Participants for This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. :
# OptionParser:2121 11394 Strict mode disabled by rule
# OptionParser:2145 11394 Participants for disables --[no]empty-
# OptionParser:2131 11394 Option resume disables empty-replicate
# OptionParser:2145 11394 Participants for disables --progress) (default 0) : progress
# OptionParser:2131 11394 Option quiet disables progress
# OptionParser:2145 11394 Participants for disables --[no]empty-
# OptionParser:2131 11394 Option explain disables empty-replicate
# OptionParser:1871 11394 Parsing DSN OPTIONS
# OptionParser:1961 11394 =item * A
# OptionParser:1988 11394 Short help: Default character set
# OptionParser:1961 11394 =item * D
# OptionParser:1988 11394 Short help: DSN table database
# OptionParser:1961 11394 =item * F
# OptionParser:1988 11394 Short help: Defaults file for connection values
# OptionParser:1961 11394 =item * h
# OptionParser:1988 11394 Short help: Connect to host
# OptionParser:1961 11394 =item * p
# OptionParser:1988 11394 Short help: Password to use when connecting
# OptionParser:1961 11394 =item * P
# OptionParser:1988 11394 Short help: Port number to use for connection
# OptionParser:1961 11394 =item * S
# OptionParser:1988 11394 Short help: Socket file to use for connection
# OptionParser:1961 11394 =item * t
# OptionParser:1988 11394 Short help: DSN table table
# OptionParser:1961 11394 =item * u
# OptionParser:1988 11394 Short help: User for login if not current user
# DSNParser:1389 11394 DSN option: copy=1, dsn=charset, desc=Default character set, key=A
# DSNParser:1389 11394 DSN option: copy=, dsn=undef, desc=DSN table database, key=D
# DSNParser:1389 11394 DSN option: copy=1, dsn=mysql_
# DSNParser:1389 11394 DSN option: copy=1, dsn=host, desc=Connect to host, key=h
# DSNParser:1389 11394 DSN option: copy=1, dsn=password, desc=Password to use when connecting, key=p
# DSNParser:1389 11394 DSN option: copy=1, dsn=port, desc=Port number to use for connection, key=P
# DSNParser:1389 11394 DSN option: copy=, dsn=mysql_socket, desc=Socket file to use for connection, key=S
# DSNParser:1389 11394 DSN option: copy=, dsn=undef, desc=DSN table table, key=t
# DSNParser:1389 11394 DSN option: copy=1, dsn=user, desc=User for login if not current user, key=u
# OptionParser:1915 11394 pt-table-checksum 3.0.4
# OptionParser:2255 11394 Cannot open /etc/percona-
#
# OptionParser:2255 11394 Cannot open /root/.
#
# OptionParser:2255 11394 Cannot open /root/.
#
# OptionParser:2217 11394 Got option host = real.fqdn.com
# OptionParser:2217 11394 Got option port = 3306
# OptionParser:2217 11394 Got option check-binlog-format = 0
# OptionParser:2217 11394 Got option defaults-file = /etc/my.cnf.percona
# OptionParser:2217 11394 Got option tables = mysql.user
# OptionParser:2452 11394 Nothing to validate for option slave-skip-
# OptionParser:2452 11394 Nothing to validate for option password type s value undef
# OptionParser:2452 11394 Nothing to validate for option chunk-index-columns type i value undef
# OptionParser:2452 11394 Nothing to validate for option chunk-time type f value 0.5
# OptionParser:2395 11394 Parsing option max-lag as a time value
# OptionParser:2409 11394 Setting option max-lag to 1
# OptionParser:2452 11394 Nothing to validate for option skip-check-
# OptionParser:2452 11394 Nothing to validate for option function type s value undef
# OptionParser:2452 11394 Nothing to validate for option slave-user type s value undef
# OptionParser:2452 11394 Nothing to validate for option pause-file type s value undef
# OptionParser:2452 11394 Nothing to validate for option where type s value undef
# OptionParser:2452 11394 Nothing to validate for option defaults-file type s value /etc/my.cnf.percona
# OptionParser:2442 11394 Parsing option chunk-size as a size value
# OptionParser:2452 11394 Nothing to validate for option ignore-tables-regex type s value undef
# OptionParser:2452 11394 Nothing to validate for option ignore-
# OptionParser:2452 11394 Nothing to validate for option check-slave-lag type s value undef
# OptionParser:2452 11394 Nothing to validate for option chunk-index type s value undef
# OptionParser:2452 11394 Nothing to validate for option pid type s value undef
# OptionParser:2452 11394 Nothing to validate for option float-precision type i value undef
# OptionParser:2452 11394 Nothing to validate for option replicate type s value percona.checksums
# OptionParser:2452 11394 Nothing to validate for option user type s value undef
# OptionParser:2452 11394 Nothing to validate for option port type i value 3306
# OptionParser:2452 11394 Nothing to validate for option socket type s value undef
# OptionParser:2395 11394 Parsing option check-interval as a time value
# OptionParser:2400 11394 No suffix given; using s for check-interval (value: 1 )
# OptionParser:2409 11394 Setting option check-interval to 1
# OptionParser:2452 11394 Nothing to validate for option recurse type i value undef
# OptionParser:2452 11394 Nothing to validate for option columns type a value undef
# OptionParser:2452 11394 Nothing to validate for option replicate-database type s value undef
# OptionParser:2452 11394 Nothing to validate for option engines type h value undef
# OptionParser:2452 11394 Nothing to validate for option retries type i value 2
# OptionParser:2452 11394 Nothing to validate for option run-time type m value undef
# OptionParser:2452 11394 Nothing to validate for option databases-regex type s value undef
# OptionParser:2452 11394 Nothing to validate for option replicate-
# OptionParser:2452 11394 Nothing to validate for option plugin type s value undef
# OptionParser:2452 11394 Nothing to validate for option tables-regex type s value undef
# OptionParser:2452 11394 Nothing to validate for option chunk-size-limit type f value 2.0
# OptionParser:2452 11394 Nothing to validate for option databases type h value undef
# OptionParser:2452 11394 Nothing to validate for option host type s value real.fqdn.com
# OptionParser:2452 11394 Nothing to validate for option separator type s value #
# OptionParser:2452 11394 Nothing to validate for option slave-password type s value undef
# OptionParser:2854 11394 --set-vars: $VAR1 = {
# innodb_
# default => 1,
# val => '1'
# },
# wait_timeout => {
# default => 1,
# val => '10000'
# }
# };
#
# DSNParser:1405 11394 Setting set-vars property
# OptionParser:2526 11394 Getting description and usage from SYNOPSIS in /bin/pt-
# OptionParser:2787 11394 Parsing SYNOPSIS in /bin/pt-
# OptionParser:2800 11394 Raw SYNOPSIS text: Usage: pt-table-checksum [OPTIONS] [DSN]
#
# 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 L<"EXIT STATUS"> is non-zero if any differences are found,
# or if any warnings or errors occur.
#
#
# OptionParser:2530 11394 Description: 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 L<"EXIT STATUS"> is non-zero if any differences are found, or if any warnings or errors occur.
# Usage: pt-table-checksum [OPTIONS] [DSN]
# Daemon:7152 11394 Starting daemon
# Daemon:7222 11394 Daemon running
# DSNParser:1477 11394 DSN string made from options: F=/etc/
# DSNParser:1417 11394 Parsing F=/etc/
# DSNParser:1436 11394 Finding value for S
# DSNParser:1446 11394 Copying value for S from defaults
# DSNParser:1436 11394 Finding value for F
# DSNParser:1436 11394 Finding value for A
# DSNParser:1446 11394 Copying value for A from defaults
# DSNParser:1436 11394 Finding value for P
# DSNParser:1436 11394 Finding value for u
# DSNParser:1446 11394 Copying value for u from defaults
# DSNParser:1436 11394 Finding value for p
# DSNParser:1446 11394 Copying value for p from defaults
# DSNParser:1436 11394 Finding value for h
# DSNParser:1436 11394 Finding value for D
# DSNParser:1446 11394 Copying value for D from defaults
# DSNParser:1436 11394 Finding value for t
# DSNParser:1417 11394 Parsing h=real.fqdn.com
# DSNParser:1436 11394 Finding value for S
# DSNParser:1446 11394 Copying value for S from defaults
# DSNParser:1436 11394 Finding value for F
# DSNParser:1446 11394 Copying value for F from defaults
# DSNParser:1436 11394 Finding value for A
# DSNParser:1446 11394 Copying value for A from defaults
# DSNParser:1436 11394 Finding value for P
# DSNParser:1446 11394 Copying value for P from defaults
# DSNParser:1436 11394 Finding value for u
# DSNParser:1446 11394 Copying value for u from defaults
# DSNParser:1436 11394 Finding value for p
# DSNParser:1446 11394 Copying value for p from defaults
# DSNParser:1436 11394 Finding value for h
# DSNParser:1436 11394 Finding value for D
# DSNParser:1446 11394 Copying value for D from defaults
# DSNParser:1436 11394 Finding value for t
# DSNParser:1446 11394 Copying value for t from defaults
# DSNParser:1530 11394 DBI:mysql:
# DSNParser:1579 11394 DBI:mysql:
# DSNParser:1579 11394 DBI:mysql:
09-18T12:36:39 DBI connect(
# Cxn:3764 11394 Destroying cxn
tags: | added: pt191 |
I cannot reproduce the issue. /tmp/12345/ certs/client- cert.pem /tmp/12345/ certs/client- key.pem /tmp/12345/ certs/ca. pem
This is my .cnf file :
[client]
user=ptcheck
password=password
#ssl-cert=
#ssl-key=
#ssl-ca=
bin/pt- table-checksum h=127.1, P=12345, F=/home/ karl/my191. cnf09-22T12: 30:33 DBI connect( ';mysql_ read_default_ file=/home/ karl/my191. cnf;host= 127.1;port= 12345;mysql_ read_default_ group=client' ,'',... ) failed: Access denied for user 'ptcheck' @'localhost' (using password: YES) at bin/pt- table-checksum line 1581.
But if I uncomment ssl related lines:
bin/pt- table-checksum h=127.1, P=12345, F=/home/ karl/my191. cnf
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE binlog_ index zone_leap_ second zone_name zone_transition zone_transition _type test.checksums test.load_ data test.sentinel
09-22T12:32:35 0 0 0 1 0 0.007 mysql.columns_priv
09-22T12:32:35 0 0 0 1 0 0.007 mysql.db
09-22T12:32:35 0 0 2 1 0 0.006 mysql.engine_cost
09-22T12:32:35 0 0 0 1 0 0.006 mysql.event
09-22T12:32:35 0 0 0 1 0 0.006 mysql.func
09-22T12:32:35 0 0 40 1 0 0.006 mysql.help_category
09-22T12:32:35 0 0 682 1 0 0.007 mysql.help_keyword
09-22T12:32:35 0 0 1340 1 0 0.007 mysql.help_relation
09-22T12:32:35 0 0 637 1 0 0.262 mysql.help_topic
09-22T12:32:35 0 0 0 1 0 0.023 mysql.ndb_
09-22T12:32:35 0 0 0 1 0 0.015 mysql.plugin
09-22T12:32:35 0 0 0 1 0 0.009 mysql.proc
09-22T12:32:35 0 0 0 1 0 0.006 mysql.procs_priv
09-22T12:32:35 0 0 0 1 0 0.007 mysql.proxies_priv
09-22T12:32:35 0 0 6 1 0 0.006 mysql.server_cost
09-22T12:32:35 0 0 0 1 0 0.006 mysql.servers
09-22T12:32:35 0 0 0 1 0 0.006 mysql.tables_priv
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_zone
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_
09-22T12:32:35 0 0 3 1 0 0.007 mysql.user
09-22T12:32:35 0 0 23 1 0 0.006 percona_
09-22T12:32:35 0 0 1 1 0 0.006 percona_
09-22T12:32:35 0 0 1 1 0 0.006 percona_
09-22T12:32:35 0 0 200 1 0 0.006 sakila.actor
09-22T12:32:36 0 0 603 1 0 0.261 sakila.address
09-22T12:32:36 0 0 16 1 0 0.024 sakila.category
09-22T12:32:36 0 0 600 1 0 0.027 sakila.city
09-22T12:32:36 0 0 109 1 0 0.024 sakila.country
09-22T12:32:36 0 0 599 ...