Vc++>>connection using old (pre-4.1.1) authentication protocol refused (client option ' Secure_auth ' Enable

Source: Internet
Author: User
Tags mysql manual

VC to connect to the remote MySQL, such as the title of the error, the online search for the cause of the error, and finally found a solution.

The cause of this error:

The reason for this is that the server-side password Management protocol is obsolete, using the old user password format storage, but the client upgrade followed by a new password format. If the mysql5.6 version encounters this inconsistency, the connection is rejected.

See the description of the "--secure-auth" option in the "Server Command Options" section of the MySQL manual: http://dev.mysql.com/doc/refman/5.6/en/ Server-options.html#option_mysqld_secure-auth

Two ways to solve the problem:

1, server-side upgrade enable Secure_auth option;

2, when the client connection off off Secure_auth.

Workaround:

General connection to the remote host, modify the server segment is not realistic, this is given in the client's solution;

When connecting, the Secure_auth parameter is set to No, can not be enabled;

Command lines: Mysql-p10.51.1.11-p3308-uroot--secure_auth=off,

In VC programming:

Mysql_init (&mysql);//initialization

Mysql.options.secure_auth=false; Close Secure_auth

Vc++>>connection using old (pre-4.1.1) authentication protocol refused (client option ' Secure_auth ' Enable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.