mysqlのsecureについてauth
最近サーバーの配置をして、サーバーmysqlのバージョンは5.5です.37,クライアント用mysqlライブラリは5.6である.15,結果としてデッドラインがつながらず,クラウドサーバ間のルーティングが通じないと考え始める.しかし、確認された後、リンクとは関係ありません.その後、ローカルでデバッグします.出力接続失敗メッセージは次のとおりです:mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
mysql公式サイトからの説明
Command-Line Format
Option-File Format
System Variable Name
Variable Scope
Global
Dynamic Variable
Yes
Permitted Values (<= 5.6.4)
Type
Default
Permitted Values (>= 5.6.5)
Type
Default
This option causes the server to block connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Use it to prevent all use of passwords employing the old format (and hence insecure communication over the network). Before MySQL 5.6.5, this option is disabled by default. As of MySQL 5.6.5, it is enabled by default; to disable it, use
1、サーバーの方、my.cnfに加算
secure-auth=1
サービスmysqld startの再起動
2、クライアント側、mysql_options(mysql,MYSQL_SECURE_AUTH,(my_bool*)0);
提案採用案1.
リファレンス
http://blog.csdn.net/zuyi532/article/details/10148259
mysql公式サイトからの説明
--secure-auth
Command-Line Format
--secure-auth
Option-File Format
secure-auth
System Variable Name
secure_auth
Variable Scope
Global
Dynamic Variable
Yes
Permitted Values (<= 5.6.4)
Type
boolean
Default
OFF
Permitted Values (>= 5.6.5)
Type
boolean
Default
ON
This option causes the server to block connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Use it to prevent all use of passwords employing the old format (and hence insecure communication over the network). Before MySQL 5.6.5, this option is disabled by default. As of MySQL 5.6.5, it is enabled by default; to disable it, use
--skip-secure-auth
. この2つのバージョンの間で、secure-authオプションのデフォルト値が変更され、解決方法は次のとおりです.1、サーバーの方、my.cnfに加算
secure-auth=1
サービスmysqld startの再起動
2、クライアント側、mysql_options(mysql,MYSQL_SECURE_AUTH,(my_bool*)0);
提案採用案1.
リファレンス
http://blog.csdn.net/zuyi532/article/details/10148259