首頁  >  文章  >  資料庫  >  以下是一些基於問題、適合文章內容且為英文的標題選項: * Sequel Pro 中 MySQL 連線失敗:為什麼無法連線? * Sequel Pro 和 MySQL Authentica

以下是一些基於問題、適合文章內容且為英文的標題選項: * Sequel Pro 中 MySQL 連線失敗:為什麼無法連線? * Sequel Pro 和 MySQL Authentica

Patricia Arquette
Patricia Arquette原創
2024-10-26 20:17:02107瀏覽

Here are a few title options that are question-based, fit the article's content, and are in English:

* MySQL Connection Failure in Sequel Pro: Why Can't I Connect?
* Sequel Pro and MySQL Authentication: How to Fix the

在Sequel Pro 中排查MySQL 連線失敗

在macOS 上嘗試使用Sequel Pro 連接到MySQL 資料庫時,您可能會遇到以下情況錯誤:

Unable to connect to host 127.0.0.1, or the request timed out.

出現此問題是因為Sequel Pro 尚未適應MySQL 使用者驗證的最新變更。此錯誤訊息明確表示未找到身份驗證外掛程式 caching_sha2_password。

解決方案:修改驗證設定

要解決此問題,您需要手動更新驗證MySQL 的設定。以下是要遵循的步驟:

  1. 更新MySQL 配置:

    • 編輯my.cnf 配置文件,通常位於/ etc/ my.cnf.
    • 在[mysqld] 部分中,加入以下行:

      default-authentication-plugin=mysql_native_password
  2. Root🎜 >Root🎜>

      Root🎜 >Root🎜 >Root🎜 >Root🎜 >Root🎜>密碼:
    • 使用mysql -u root -p 從終端連接到MySQL 伺服器。

      ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[new password]';
    • 連線後,執行下列指令將root 密碼變更為與mysql_native_password 外掛程式相容的密碼:
    • brew services restart mysql
    • 重新啟動MySQL 服務:

退出MySQL shell 並使用以下命令重新啟動MySQL 服務:

完成這些步驟後,Sequel Pro 應該能夠毫無問題地連接到MySQL 資料庫。 注意: 對於非自製 MySQL 安裝,可以透過系統偏好設定初始化資料庫並選擇「使用舊密碼」來進行破壞性的快速修復。 」但是,此方法會刪除現有表。

以上是以下是一些基於問題、適合文章內容且為英文的標題選項: * Sequel Pro 中 MySQL 連線失敗:為什麼無法連線? * Sequel Pro 和 MySQL Authentica的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn