简体   繁体   English

错误代码(60)是什么意思?

[英]What's the meaning of the error code (60)?

Given the following client error message:鉴于以下客户端错误消息:

Error: Can't connect to MySQL server on 'server' (60)错误:无法连接到“服务器”上的 MySQL 服务器 (60)

What's the meaning of error code 60?错误代码60是什么意思? MySQL v5.6 and v5.7 do not provide any info about it in docs, on the other hand v8.0 just says: MySQL v5.6 和 v5.7 没有在文档中提供任何有关它的信息,另一方面 v8.0 只是说:

Error number: 60;错误号:60; Symbol: EE_SSL_ERROR;符号:EE_SSL_ERROR;

Message: SSL error: %s.消息:SSL 错误:%s。

It seems to be related to SSL, but the same applies to previous versions of MySQL?好像和SSL有关,但同样适用于以前版本的MySQL?

If database server is on a remote machine, then try to test the client-server connectivity using ping command, for instance:如果数据库服务器在远程机器上,则尝试使用 ping 命令测试客户端-服务器连接,例如:

ping server_ip_address ping server_ip_address

If you are able to ping, then try:如果您能够ping通,请尝试:

mysql -u username -p -h host_address -P port mysql -u 用户名 -p -h 主机地址 -P 端口

If all the above commands run successfully, but you still see the error, open the mysql config file.如果上述所有命令运行成功,但您仍然看到错误,请打开 mysql 配置文件。

vi /etc/mysql/my.cnf vi /etc/mysql/my.cnf

OR或者

vi /etc/mysql/mysql.conf.d/mysqld.cnf vi /etc/mysql/mysql.conf.d/mysqld.cnf

Look for the line below and comment it out using the # character:查找下面的行并使用 # 字符将其注释掉:

bind-address = 127.0.0.1绑定地址 = 127.0.0.1

Save the file and exit, afterwards restart the mysql service like:保存文件并退出,然后重启 mysql 服务,如:

sudo systemctl start mysql.service OR sudo /etc/init.d/mysqld start sudo systemctl start mysql.service 或 sudo /etc/init.d/mysqld start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM