SSL Connection for pt-table-checksum not working

Bug #1717986 reported by Steve Simpson
8
This bug affects 1 person
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-toolkit/percona-toolkit.conf
# pt-table-checksum -F /etc/my.cnf.percona -t mysql.user
09-18T11:59:55 DBI connect(';mysql_read_default_file=/etc/my.cnf.percona;host=real.fqdn.com;port=3306;mysql_read_default_group=client','',...) failed: Access denied for user 'ptcheck'@'real.fqdn.com' (using password: YES) at /bin/pt-table-checksum line 1581.

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-toolkit/percona-toolkit.conf
[root@real percona-toolkit]# pt-table-checksum -F /etc/my.cnf.percona -t mysql.user
Cannot connect to F=/etc/my.cnf.percona,P=3306,h=slave.fqdn.com
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-file=/etc/my.cnf.percona -h real.fqdn.com
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-file=/etc/my.cnf.percona -h slave.fqdn.com
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,SUPER, SELECT ON *.* TO `ptcheck`@`%` IDENTIFIED BY 'password' REQUIRE x509;
GRANT REPLICATION SLAVE,PROCESS,SUPER, SELECT ON *.* TO `ptcheck`@`localhost` IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON percona.* TO `ptcheck`@`%`;
GRANT ALL PRIVILEGES ON percona.* TO `ptcheck`@`localhost`;

CONFIG FILES
============
[root@real percona-toolkit]# cat percona-toolkit.conf
host=real.fqdn.com
#host=localhost -- used in 1st working example
port=3306
no-check-binlog-format

[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-toolkit-3.0.4-1.el7.x86_64

kernel-3.10.0-514.26.2.el7.x86_64

MariaDB-client-10.1.26-1.el7.centos.x86_64
MariaDB-common-10.1.26-1.el7.centos.x86_64
MariaDB-server-10.1.26-1.el7.centos.x86_64
MariaDB-shared-10.1.26-1.el7.centos.x86_64

perl-5.16.3-291.el7.x86_64
perl-Carp-1.26-244.el7.noarch
perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64
perl-Compress-Raw-Zlib-2.061-4.el7.x86_64
perl-constant-1.27-2.el7.noarch
perl-Data-Dumper-2.145-3.el7.x86_64
perl-DBD-MySQL-4.023-5.el7.x86_64
perl-DBI-1.627-4.el7.x86_64
perl-Digest-1.17-245.el7.noarch
perl-Digest-HMAC-1.03-5.el7.noarch
perl-Digest-MD5-2.52-3.el7.x86_64
perl-Digest-SHA-5.85-3.el7.x86_64
perl-Encode-2.51-7.el7.x86_64
perl-Error-0.17020-2.el7.noarch
perl-Exporter-5.68-3.el7.noarch
perl-File-Path-2.09-2.el7.noarch
perl-File-Temp-0.23.01-3.el7.noarch
perl-Filter-1.49-3.el7.x86_64
perl-Getopt-Long-2.40-2.el7.noarch
perl-Git-1.8.3.1-6.el7_2.1.noarch
perl-HTTP-Tiny-0.033-3.el7.noarch
perl-IO-Compress-2.061-2.el7.noarch
perl-IO-Socket-IP-0.21-4.el7.noarch
perl-IO-Socket-SSL-1.94-6.el7.noarch
perl-libs-5.16.3-291.el7.x86_64
perl-macros-5.16.3-291.el7.x86_64
perl-Net-Daemon-0.48-5.el7.noarch
perl-Net-DNS-0.72-6.el7.x86_64
perl-Net-LibIDN-0.12-15.el7.x86_64
perl-Net-SSLeay-1.55-6.el7.x86_64
perl-parent-0.225-244.el7.noarch
perl-PathTools-3.40-5.el7.x86_64
perl-PlRPC-0.2020-14.el7.noarch
perl-Pod-Escapes-1.04-291.el7.noarch
perl-podlators-2.5.1-3.el7.noarch
perl-Pod-Perldoc-3.20-4.el7.noarch
perl-Pod-Simple-3.28-4.el7.noarch
perl-Pod-Usage-1.63-3.el7.noarch
perl-Scalar-List-Utils-1.27-248.el7.x86_64
perl-Socket-2.010-4.el7.x86_64
perl-Storable-2.45-3.el7.x86_64
perl-TermReadKey-2.30-20.el7.x86_64
perl-Text-ParseWords-3.29-4.el7.noarch
perl-threads-1.87-4.el7.x86_64
perl-threads-shared-1.43-6.el7.x86_64
perl-TimeDate-2.30-2.el7.noarch
perl-Time-HiRes-1.9725-3.el7.x86_64
perl-Time-Local-1.2300-2.el7.noarch

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-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# Arguments: _[-F]_ _[/etc/my.cnf.percona]_ _[-t]_ _[mysql.user]_
# 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-binlog-format
# 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-replicate-table such that the replicate table's upper and lower boundary columns are created with the BLOB data type
# 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-replication-filters
# 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-slave-tables
# 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-index-columns
# 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-replicate-table
# 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-replicate-table
# 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-replicate-table)
# 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-databases-regex
# 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-tables-regex
# 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_checksum_plugin class
# 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-check
# OptionParser:1988 11394 Short help: Check replicas for data differences after finishing each table
# OptionParser:1961 11394 =item --replicate-check-only
# 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-check-retries
# OptionParser:1988 11394 Short help: Retry checksum comparison this many times when a difference is encountered
# OptionParser:1961 11394 =item --replicate-database
# 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-replicate-table)
# 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-check-slave-lag
# 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-skip-tolerance
# 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-replicate-table
# 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-format! desc => Check that the binlog_format is the same on all servers (default yes) attributes => HASH(0x297f6e0)
# 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-replicate-table such that the replicate table's upper and lower boundary columns are created with the BLOB data type attributes => HASH(0x297f590)
# 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-replication-filters! desc => Do not checksum if any replication filters are set on any replicas (default yes) attributes => HASH(0x297f320)
# OptionParser:2067 11394 check-replication-filters type: undef
# OptionParser:2074 11394 check-replication-filters default: yes
# 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-columns=i desc => Use only this many left-most columns of a --chunk-index attributes => HASH(0x297c5a0)
# 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-replicate-table! desc => Create the --replicate database and table if they do not exist (default yes) attributes => HASH(0x297c078)
# OptionParser:2067 11394 create-replicate-table type: undef
# OptionParser:2074 11394 create-replicate-table default: yes
# 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-table! desc => Delete previous checksums for each table before checksumming the table (default yes) attributes => HASH(0x2969210)
# OptionParser:2067 11394 empty-replicate-table type: undef
# OptionParser:2074 11394 empty-replicate-table default: yes
# 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-replicate-table) (default 0) attributes => HASH(0x2968f28)
# 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-replicate-table) (default 0)
# 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-databases-regex=s desc => Ignore databases whose names match this Perl regex attributes => HASH(0x281c178)
# OptionParser:2067 11394 ignore-databases-regex type: s
# OptionParser:2028 11394 Parsing opt spec: group => Filter spec => ignore-engines=H desc => Ignore this comma-separated list of storage engines (default FEDERATED,MRG_MyISAM) attributes => HASH(0x2968e20)
# OptionParser:2067 11394 ignore-engines type: H
# OptionParser:2074 11394 ignore-engines default: FEDERATED,MRG_MyISAM
# 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-tables-regex=s desc => Ignore tables whose names match the Perl regex attributes => HASH(0x285c118)
# 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_checksum_plugin class attributes => HASH(0x285c670)
# 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-check-only desc => Check replicas for consistency without executing checksum queries attributes => HASH(0x2978160)
# OptionParser:2067 11394 replicate-check-only type: undef
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-check-retries=i desc => Retry checksum comparison this many times when a difference is encountered (default 1) attributes => HASH(0x2978208)
# OptionParser:2067 11394 replicate-check-retries type: i
# OptionParser:2074 11394 replicate-check-retries default: 1
# OptionParser:2028 11394 Parsing opt spec: group => default spec => replicate-database=s desc => USE only this database attributes => HASH(0x29782e0)
# 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-replicate-table) attributes => HASH(0x29783a0)
# OptionParser:2067 11394 resume type: undef
# OptionParser:2083 11394 Deferring check of disables rule for HASH(0x297bd60) disables --[no]empty-replicate-table)
# 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-slave-lag=d desc => DSN to skip when checking slave lag attributes => HASH(0x29e9848)
# OptionParser:2067 11394 skip-check-slave-lag type: d
# 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-tolerance=f desc => 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 (default 1.0) attributes => HASH(0x29e9c68)
# OptionParser:2067 11394 slave-skip-tolerance type: f
# OptionParser:2074 11394 slave-skip-tolerance default: 1.0
# 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-replicate-table desc => Truncate the replicate table before starting the checksum attributes => HASH(0x29e9fb0)
# OptionParser:2067 11394 truncate-replicate-table type: undef
# 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-replicate-table) : empty-replicate-table
# OptionParser:2131 11394 Option resume disables empty-replicate-table
# 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-replicate-table) (default 0) : empty-replicate-table
# OptionParser:2131 11394 Option explain disables empty-replicate-table
# 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_read_default_file, desc=Defaults file for connection values, key=F
# 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-toolkit/pt-table-checksum.conf: No such file or directory
#
# OptionParser:2255 11394 Cannot open /root/.percona-toolkit.conf: No such file or directory
#
# OptionParser:2255 11394 Cannot open /root/.pt-table-checksum.conf: No such file or directory
#
# 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-tolerance type f value 1.0
# 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-slave-lag type d value undef
# 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-databases-regex type s value undef
# 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-check-retries type i value 1
# 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_lock_wait_timeout => {
# 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-table-checksum
# OptionParser:2787 11394 Parsing SYNOPSIS in /bin/pt-table-checksum
# 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/my.cnf.percona,P=3306,h=real.fqdn.com,t=HASH(0x29fd3c8)
# DSNParser:1417 11394 Parsing F=/etc/my.cnf.percona,P=3306,h=real.fqdn.com,t=HASH(0x29fd3c8)
# 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:;mysql_read_default_file=/etc/my.cnf.percona;host=real.fqdn.com;port=3306;mysql_read_default_group=client
# DSNParser:1579 11394 DBI:mysql:;mysql_read_default_file=/etc/my.cnf.percona;host=real.fqdn.com;port=3306;mysql_read_default_group=client undef undef mysql_enable_utf8=>0, ShowErrorStatement=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0
# DSNParser:1579 11394 DBI:mysql:;mysql_read_default_file=/etc/my.cnf.percona;host=real.fqdn.com;port=3306;mysql_read_default_group=client undef undef mysql_enable_utf8=>0, ShowErrorStatement=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0
09-18T12:36:39 DBI connect(';mysql_read_default_file=/etc/my.cnf.percona;host=real.fqdn.com;port=3306;mysql_read_default_group=client','',...) failed: Access denied for user 'ptcheck'@'real.fqdn.com' (using password: YES) at /bin/pt-table-checksum line 1581.
# Cxn:3764 11394 Destroying cxn

Tags: pt191
tags: added: pt191
Revision history for this message
Carlos Salguero (carlos-salguero) wrote :
Download full text (4.0 KiB)

I cannot reproduce the issue.
This is my .cnf file :
[client]
user=ptcheck
password=password
#ssl-cert=/tmp/12345/certs/client-cert.pem
#ssl-key=/tmp/12345/certs/client-key.pem
#ssl-ca=/tmp/12345/certs/ca.pem

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
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_binlog_index
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_zone_leap_second
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_zone_name
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_zone_transition
09-22T12:32:35 0 0 0 1 0 0.006 mysql.time_zone_transition_type
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_test.checksums
09-22T12:32:35 0 0 1 1 0 0.006 percona_test.load_data
09-22T12:32:35 0 0 1 1 0 0.006 percona_test.sentinel
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 ...

Read more...

Changed in percona-toolkit:
status: New → Incomplete
assignee: nobody → Carlos Salguero (carlos-salguero)
Revision history for this message
Dennis Anderson (deanderson61) wrote :

I modified 'pt-table-checksum' and added a line similar to the following to hard code my SSL settings:

. ';mysql_ssl=1;mysql_ssl_client_key=KEY_FILE;mysql_ssl_client_cert=CERT_FILE;mysql_ssl_ca_file=CA_FILE''

after this line

. ';mysql_read_default_group=client'

located in 'sub get_cxn_params'

I am using the same version of pt-table-checksum (3.0.4) as Steve.

Modified file attached.

Revision history for this message
abeverley (l-andy) wrote :

I've spent ages debugging this. I'm not really any further forward for a solution, but what I have found is that it appears to be a bug somewhere between the Perl DBD::mysql driver (which pt-table-checksum uses) and Mysql/Mariadb.

I created a very simple Perl script to connect to the same remote server using SSL (see below). As per the previous poster, I found that with the SSL information hard-coded into the connection string it worked, but with it in the .cnf file it didn't. It does appear to read the .cnf file though, as it successfully extracts the username and password.

#!/usr/bin/perl

use strict;
use warnings;

use DBI;

DBI->connect(
  "DBI:mysql:;host=XXXX;mysql_read_default_file=...cnf", undef, undef,
  {RaiseError => 1, AutoCommit => 1, mysql_enable_utf8 => 1}
);

Revision history for this message
abeverley (l-andy) wrote :

I don't know whether this is actually a bug with DBD::mysql, but I've opened a bug report there anyway: https://rt.cpan.org/Public/Bug/Display.html?id=124031

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1444

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.