在更新后(通过-apt更新和apt升级),无法访问MantisBT的安装。数据库和用户是完整的。 可以通过SSH完整访问服务器(VPS)。
与数据库的连接失败。由返回的错误 数据库为#2054:服务器请求了身份验证方法 客户端未知使用Web浏览器中的“返回”按钮可以 回到前面的页面。您可以在那里纠正问题 已在此错误通知中找到或选择了另一个 行动。您也可以单击菜单栏中的选项直接 转到新部分。
phpmyadmin中的错误:
2054-服务器请求客户端未知的身份验证方法
mysqli_real_connect():服务器请求的身份验证方法 客户端未知[caching_sha2_password]
mysqli_real_connect():(HY000 / 2054):服务器请求了 客户端未知的身份验证方法
Ubuntu 18.04.2 LTS
发布:18.04
PHP 7.2.15-0ubuntu0.18.04.1(cli)(内置:2019年2月8日14:54:22)(NTS)
用于Linux的x86_64上的MySQL Ver 8.0.15(MySQL社区服务器-GPL)
服务器版本:Apache / 2.4.29(Ubuntu)
我修改了MySQL配置:
select * from
(
SELECT p.CnBio_ID, p.Type, p.Subj_Date_Last_Seen_1,row_number() over(partition by p.CnBio_ID, p.Type order by p.Subj_Date_Last_Seen_1 desc) as rn
from Phones p
)A where rn=1
但出现以下错误:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rootpassword'
尝试更新MySQL实例时:
ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 51, found 50. Created with MySQL 80013, now running 80015. Please use mysql_upgrade to fix this error.
升级过程遇到错误,将无法继续。
答案 0 :(得分:0)
以root用户登录MySQL控制台:
mysql -u root -p<password>
运行以下代码:
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'NEW PASSWORD';
您必须将“新密码”更改为新密码,然后尝试登录。
希望这会有所帮助。
答案 1 :(得分:0)
我使用以下命令更新了表的结构:
mysql_upgrade -u root -p --force
结果是:
Checking server version.
Running queries to upgrade MySQL server.
Upgrading system table data.
Checking system database.
mysql.columns_priv Table is already up to date
mysql.component Table is already up to date
mysql.db Table is already up to date
mysql.default_roles Table is already up to date
mysql.engine_cost Table is already up to date
mysql.func Table is already up to date
mysql.general_log Table is already up to date
mysql.global_grants Table is already up to date
mysql.gtid_executed Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date
mysql.innodb_index_stats Table is already up to date
mysql.innodb_table_stats Table is already up to date
mysql.password_history Table is already up to date
mysql.plugin Table is already up to date
mysql.procs_priv Table is already up to date
mysql.proxies_priv Table is already up to date
mysql.role_edges Table is already up to date
mysql.server_cost Table is already up to date
mysql.servers Table is already up to date
mysql.slave_master_info Table is already up to date
mysql.slave_relay_log_info Table is already up to date
mysql.slave_worker_info Table is already up to date
mysql.slow_log Table is already up to date
mysql.tables_priv Table is already up to date
mysql.time_zone Table is already up to date
mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.user Table is already up to date
The sys schema is already up to date (version 2.0.0).
Checking databases.
再次尝试更改root密码时:
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'newpassword';
答案是:
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'%'
在询问错误时,我找到了几种解决方案,以下是其中一种有趣的方法:
我知道这是一个相当老的问题,但似乎仍未完全解决。一世 遇到相同的问题,我通过以下方式解决了这个问题。
在MySQL的my.ini文件中,我将default_authentication_plugin更改为 mysql_native_password
'default_authentication_plugin = caching_sha2_password'注释掉 default_authentication_plugin = mysql_native_password然后,在 MySQL Workbench,我将模式的密码类型设置为标准,而不是 sha2-的东西。然后就可以了。
MySQL是8.0版,PHP是7.26在Windows 7上运行。
总而言之,我认为我们应该在MySQL配置文件中进行以下调整:
' default_authentication_plugin=caching_sha2_password ' comment out
default_authentication_plugin=mysql_native_password
WAMP中的配置文件为my.ini
,LAMP中的文件未知,并且(对我来说)是我向整个社区寻求帮助时的位置。
谢谢。