I have a MySQL server with version 5.6.12-log (it's running on OpenSUSE). I can connect to it from another server (CentOS 6) using:

mysql -h **** -u **** --port **** -p

It prompts me for my password and connects just fine. The client version is "Ver 14.14 Distrib 5.6.12, for Linux (x86_64) using EditLine wrapper."

However, from another server (running CentOS 7), using the same command, I get the following error after entering my password:

ERROR 2000 (HY000): Unknown MySQL error

This error is useless. There is nothing in the client machine logs that indicate the cause of the failure. However, I do know that the MySQL server is at least receiving the connect request because it logs a warning about the Reverse DNS lookup not matching. It's just a warning—not the cause of this problem—but it proves that firewalls and/or network configurations aren't blocking the connection. There is nothing else in the MySQL server log (or error log) that indicates the cause of the failure. This client version is "Ver 14.14 Distrib 5.6.23, for Linux (x86_64) using EditLine wrapper."

Help??? I'm lost here. In 10+ years of MySQL admining, I've never seen this error before. I don't even know where to begin.

  • This is a client error. Is it possible you use some other version (not 5.6.23) to check whether the error persists or not? Feb 11, 2015 at 16:30
  • I wouldn't know how to use another version of the client from that machine. I can tell you that the same client can connect to the local server without error. It just can't connect to the remote server. Also, the 5.6.12 client on a different machine can connect to the remote server. :-/ Is there really no way to see what the actual error is? Feb 11, 2015 at 16:39
  • Anything in mysqld.err? Is skip_name_resolve turned on? Is there a firewall? Selinux? Will it work if you use the IP-address instead of the hostname?
    – Rick James
    Feb 11, 2015 at 22:32
  • 1. On the client machine, no log is generated. On the server machine, /var/log/mysql/mysqld.log is empty and /var/log/mysql/mysqld-error.log has a warning about the client's reverse DNS not matching. 2. skip_name_resolve is turned off on the server. 3. There is a firewall and it is not the problem (the connection is reaching the server as per the warning in the log file). 4. SELinux is enabled on the server machine, the client machine that can connect, and the client machine that can't connect. 5. I'm already using the IP address and not the hostname, so that's not the problem. Feb 12, 2015 at 4:13

2 Answers 2


Well I figured it out, and it isn't pretty. I guess I'll have to file a bug with MySQL.

  • The server is compiled with OpenSSL.
  • The working client is compiled with OpenSSL.
  • The client that can't connect is compiled with yaSSL.

The user I was trying to connect with used the sha256_password authentication plugin. When I dropped and re-created the user with mysql_native_password instead, the problem went away and I can connect from all clients. It appears that the sha256_password plugin doesn't work if the server and client are compiled against different SSL providers. (It might not even work with yaSSL at all.)


I use this command "service mysqld stop" and "service mysqld start" to restart my mysql service, mysql work well.

  • Hey there @chengwengao! How does this answer help answer the question? Maybe if you provided more detail it would help us understand. Thanks! Apr 23, 2019 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.