MariaDB - 无法使用正确的密码从 Dbeaver 连接到 MariaDB 实例

MariaDB - Cannot connect to MariaDB instance from Dbeaver using correct password(MariaDB - 无法使用正确的密码从 Dbeaver 连接到 MariaDB 实例)
本文介绍了MariaDB - 无法使用正确的密码从 Dbeaver 连接到 MariaDB 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在端口 3306 上连接到 MariaDb 的本地主机实例.我很清楚,由于 MariaDb 规范,root 不能使用 localhost,所以我创建了来自命令行的另一个用户,密码为root"并授予我的测试"数据库的所有权限:

I am trying to connect to a localhost instance of MariaDb on port 3306. I'm well aware that root cannot use localhost because of MariaDb specifications so I created another user from the command line with password 'root' and all privileges granted to my 'test' database:

CREATE USER 'myuser' IDENTIFIED BY 'root';
GRANT USAGE ON *.* TO 'myuser'@localhost IDENTIFIED BY 'root';
GRANT ALL privileges ON `test`.* TO 'myuser'@localhost;
FLUSH PRIVILEGES;

当我尝试使用正确的密码和用户名从 DBeaver 打开连接时,出现错误:

When I try to open a connection from DBeaver with the correct password and username, an error appears:

用户'myuser'@'localhost'的访问被拒绝(使用密码:YES)当前字符集是 windows-1251.如果已使用其他方式设置密码charset,考虑使用选项'passwordCharacterEncoding'

Access denied for user 'myuser'@'localhost' (using password: YES) Current charset is windows-1251. If password has been set using other charset, consider using option 'passwordCharacterEncoding'

为什么会这样?是因为 DBeaver 和 MariaDB 的实例之间的某些密码哈希算法不匹配吗?如何解决此问题并成功连接?

Why does it happen? Is it because of some password hashing algorithms mismatch between DBeaver and MariaDB's instance? How do I fix this and connect successfuly?

推荐答案

你必须去 DriverProperties 并输入你用来编码密码的编码(UTF-8).当您使用 docker image 在本地运行 maria db 时,这很常见参考下图.

You have to to go to DriverProperties and enter the encoding you have used to encode password(UTF-8). This is very common when you use docker image to run maria db on your local Refer the below image.

这篇关于MariaDB - 无法使用正确的密码从 Dbeaver 连接到 MariaDB 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)