mysql错误2026(HY000):SSL连接错误:错误:00000001:lib(0):func(0):原因(1) [英] mysql ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1)
问题描述
背景:
我正在尝试通过命令行登录由我们的一位管理员设置的mysql数据库.我看到他们启用了ssl,因为当我尝试连接时收到此消息:
I'm trying to log in via command line to a mysql database set up by one of our admins. I see that 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)
到目前为止我已检查的内容:
我已经在my.cnf文件中检查了ssl设置:
I've checked the my.cnf file for the 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 look this 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)
,还有:
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)
我为主机指定的值与my.cnf中设置为绑定地址的值匹配
The value I've specified for host matches what is set up as the bind-address in my.cnf
我仍然在Google上搜索更多文章/帖子.但是到目前为止,我还没有找到解决方案.
I'm still google more to find other articles / posts. But so far, I haven't been able to find a solution.
任何建议将不胜感激.
ps.我确实知道数据库本身是可以的,因为连接到该数据库的Web应用程序工作正常.我只需要能够连接就可以对数据库进行转储.
ps. I do know that the database itself is ok because the web application that connects to it is working fine. I just need to be able to connect so I can do a dump of the database.
推荐答案
我找到了这个选项
mysql --user=root --password=test testdb --skip-ssl
它也可以和mysqldump命令一起使用.
And it also works with the mysqldump command.
这篇关于mysql错误2026(HY000):SSL连接错误:错误:00000001:lib(0):func(0):原因(1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!