---
title: mariadb创建数据库时报错
description: "Mariadb验证用户时正常，创建数据库时报错，报错信息类似：“ERROR 1045 (28000): Access denied for user 'pasa'@'localhost' (using password: YES)”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0068.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0068.html
indexId: 1ba6bfdc8115c1075397acf2f8fa92b0c689dd64d76abf4ad812f7f2c27f0bb174
---
# mariadb创建数据库时报错

#### 问题现象描述

Mariadb验证用户时正常，创建数据库时报错，报错信息类似：“ERROR 1045 (28000): Access denied for user 'pasa'@'localhost' (using password: YES)”。


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

pasa用户的权限问题。


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

mysql -upasa -p123456

use mysql;

insert into mysql.user(Host,User,Password) values("localhost","pasa",password("123456"));
