0

I am attempting to use the pt-show-grants to connected to a MySQL instance with SSL enabled.

$ pt-show-grants --version
pt-show-grants 3.0.9

If I attempt to connect to my database without any accommodations for SSL, I get the following error:

$ pt-show-grants -h MYHOST.mysql.database.azure.com -u MYUSER@MYHOST -D mydb  --ask-pass
Enter password: 
DBI connect('mydb;host=MYHOST.mysql.database.azure.com;mysql_read_default_group=client','MYUSER@MYHOST',...) failed: SSL connection is required. Please specify SSL options and retry. at /usr/local/Cellar/percona-toolkit/3.0.9/libexec/bin/pt-show-grants line 1367.

I then tried to follow these instructions to enable SSL:

My cert:

$ cat /tmp/azure-mysql.pem
-----BEGIN CERTIFICATE-----
 MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
 ...
-----END CERTIFICATE-----

My config file:

 $ cat /tmp/config.cnf 
[client]
 user = MYUSER@MYHOST
 password = myPaSsWord
 ssl-ca = /tmp/azure-mysql.pem

My modified command fails in the same way:

$ pt-show-grants -h MYHOST.mysql.database.azure.com -u MYUSER@MYHOST -D mydb -F /tmp/config.cnf
DBI connect('mydb;host=MYHOST.mysql.database.azure.com;mysql_read_default_group=client','MYUSER@MYHOST',...) failed: SSL connection is required. Please specify SSL options and retry. at /usr/local/Cellar/percona-toolkit/3.0.9/libexec/bin/pt-show-grants line 1367.

I'd like to know how to properly configure my config file to enable SSL. Bonus points for a method that does not use a config file at all. Thanks for your time!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.