我在Ubuntu上有MySQL 8.0.33。在错误日志中,我看到以下警告:
警告 服务器 'default_authentication_plugin‘被弃用,并将在以后的发行版中删除。请改用authentication_policy。
在我的mysql.cnf文件中,我更改了这一行:
default_authentication_plugin= mysql_native_password到这一行:
authentication_policy= mysql_native_password但是它破坏了我的应用程序:当应用程序试图连接到数据库时,它会得到一个错误Could not connect: The server requested authentication method unknown to the client.。
在不对应用程序进行太多更改的情况下,解决此问题并删除警告的正确方法是什么?
发布于 2023-06-01 16:37:19
你能详细说明你后来犯了什么错误吗?
authentication_policy= mysql_native_password//我只想说,这个配置对我来说很好:
authentication_policy = CACHING_SHA2_PASSWORD保存此文件,然后使用以下命令重新启动MySQL服务:
sudo systemctl restart mysqlhttps://dba.stackexchange.com/questions/327767
复制相似问题