mysql串連錯誤解決(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled))

來源:互聯網
上載者:User

標籤:

當使用mysql的新版本是,串連老版本的mysql,就會有可能報:

ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref
used (client option ‘secure_auth‘ enabled)這個錯誤。

異常原因在於伺服器端的密碼管理協議陳舊,使用的是舊有的使用者密碼格式儲存;但是用戶端升級之後採用了新的密碼格式。mysql新版本遇到這種不一致的情況就會拒絕串連。

所以在串連是:要設定secure_auth為false,即串連時加上--secure_auth=off,如:mysql -u使用者名稱 -pIP地址 -P連接埠號碼  --secure_auth=off即可。

如果是使用mysql workbench串連時,如

mysql串連錯誤解決(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled))

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.