This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13463|Reply: 0

[Source] MySql 8.0 Either use a secure connection, specify the server's RSA...

[Copy link]
Posted on 11/19/2019 9:33:09 AM | | | |
Authentication method 'caching_sha2_password' failed. Either use a secure connection, specify the server's RSA public key with ServerRSAPublicKeyFile, or set AllowPublicKeyRetrieval=True.



Authentication method "caching_sha2_password" failed. Use a secure connection, either specify the server's RSA public key using ServerRSAPublicKeyFile, or set AllowPublicKeyRetrieval = True.

The easiest workaround is to add it after the connectionallowPublicKeyRetrieval=true

In the document (The hyperlink login is visible.The explanation given is:

If the user uses sha256_password authentication, the password must be protected in transit using the TLS protocol, but if the RSA public key is not available, the public key provided by the server can be used; The RSA public key of the server can be specified in the connection via ServerRSAPublicKeyFile, or the AllowPublicKeyRetrieval=True parameter to allow the client to obtain the public key from the server; However, it should be noted that AllowPublicKeyRetrieval=True may cause malicious agents to obtain plaintext passwords through man-in-the-middle attacks (MITM), so it is turned off by default and must be explicitly enabled



So, modify the connection string as follows:


The default password for MySQL 8.0.17 is encrypted in caching_sha2_password, as shown in the figure below:








Previous:Install the ping tool in a container built with Docker
Next:Examples explain what Redis cache penetration, cache avalanche, and cache breakdown are
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com