---
title: mariadb验证用户的时候报错
description: "Mariadb验证用户时报错，报错信息类似：“ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0067.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0067.html
indexId: 0b58697f36c57e12d3db973f39c06a14530a808f7b204732f38a00c8f94ef38b74
---
# mariadb验证用户的时候报错

#### 问题现象描述

Mariadb验证用户时报错，报错信息类似：“ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)”。


#### 关键过程、根本原因分析

默认的plugin属性有问题


#### 结论、解决方案及效果

执行以下命令，修改plugin属性。

update user set authentication_string=PASSWORD(''), plugin='mysql_native_password' where user='root';

flush privileges;
