Hello ,
Perl DBD::Mysql
gesti@gestitest:~$ perl -MDBD::mysql -e 'print $DBD::mysql::VERSION'
5.005
The command I am using
gesti@gestitest:~$ pt-table-checksum --replicate=percona.checksums --ignore-databases mysql h=192.168.100.136,P=3306,F=/etc/mysql/mysql.conf.d/percona.cnf --recursion-method dsn=“D=percona,t=dsns,F=/etc/mysql/mysql.conf.d/percona.cnf” --no-check-binlog-format --no-check-replication-filters
/etc/mysql/mysql.conf.d/percona.cnf contains
[client]
ssl_mode = required
ssl_cert = /var/lib/mysql/client-cert.pem
ssl_key = /var/lib/mysql/client-key.pem
ssl_ca = /var/lib/mysql/ca.pem
user = percona
password = "pERc0nSAj1!#1e"
I can login with the above user
gesti@gestitest:~$ sudo mysql -upercona -p'pERc0nSAj1!#1e' --ssl-mode=VERIFY_CA
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1017
Server version: 8.0.36-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
You are enforcing ssl connection via unix socket. Please consider
switching ssl off as it does not make connection via unix socket
any more secure.
The user has all privileges
mysql> show grants for percona@`%`;
| Grants for percona@%
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `percona`@`%` |
| GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,XA_RECOVER_ADMIN ON *.* TO `percona`@`%` |
Note when I remove the quotes from the password on /etc/mysql/mysql.conf.d/percona.cnf the error is
gesti@gestitest:~$ pt-table-checksum --replicate=percona.checksums --ignore-databases mysql h=192.168.100.136,P=3306,F=/etc/mysql/mysql.conf.d/percona.cnf --recursion-method dsn="D=percona,t=dsns,F=/etc/mysql/mysql.conf.d/percona.cnf" --no-check-binlog-format --no-check-replication-filters
05-24T17:14:55 DBI connect(';mysql_read_default_file=/etc/mysql/mysql.conf.d/percona.cnf;host=192.168.100.136;port=3306;mysql_read_default_group=client','',...) failed: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at /usr/bin/pt-table-checksum line 1636.
With single and double quotes on the password
gesti@gestitest:~$ pt-table-checksum --replicate=percona.checksums --ignore-databases mysql h=192.168.100.136,P=3306,F=/etc/mysql/mysql.conf.d/percona.cnf --recursion-method dsn="D=percona,t=dsns,F=/etc/mysql/mysql.conf.d/percona.cnf" --no-check-binlog-format --no-check-replication-filters
05-24T17:15:49 DBI connect(';mysql_read_default_file=/etc/mysql/mysql.conf.d/percona.cnf;host=192.168.100.136;port=3306;mysql_read_default_group=client','',...) failed: Access denied for user 'percona'@'192.168.100.136' (using password: YES) at /usr/bin/pt-table-checksum line 1636.
This is a test server which has no replica, still I guess it would be connected.
Am I missing something ?