Mysql ERROR 2026 (HY000): SSL connection error: error: 00000001: lib (0): func (0): reason (1)
Background:
I am trying to login via command line to a mysql database configured by one of our admins. I can see they have ssl enabled because when I try to connect I get this message:
mysql --user=root --password=test testdb
ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1)
What I have checked So far:
I checked my.cnf file for ssl settings:
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
ssl-ca = /etc/ssl/ca-self-cert.pem
ssl-cert = /etc/ssl/server-self-cert.pem
ssl-key = /etc/ssl/server-self-key.pem
[mysqld]
...
server-id = 100
relay-log = mysqld-relay-bin
ssl-ca = /etc/ssl/ca-self-cert.pem
ssl-cert = /etc/ssl/server-self-cert.pem
ssl-key = /etc/ssl/server-self-key.pem
I tried changing the login command to watch this instead:
mysql --user=root --password=test testdb --protocol=TCP --ssl-ca=/etc/ssl/ca-self-cert.pem
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (111)
and:
mysql --user=root --password=test testdb --protocol=TCP --ssl-ca=/etc/ssl/ca-self-cert.pem --host=10.123.123.123
ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1)
The value I provided for the host matches what is set as the bind address in my.cnf
I still google more to find other articles / posts. But so far I have not been able to find a solution.
Any suggestions would be appreciated.
ps. I know the database itself is fine because the web app that connects to it is working fine. I just need to connect so I can dump the database.
+3
source to share