'MariaDB - Cannot connect to MariaDB instance from Dbeaver using correct password
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;
When I try to open a connection from DBeaver with the correct password and username, an error appears:
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'
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?
Solution 1:[1]
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.
Solution 2:[2]
I had the same issue these days and didn’t find an answer online. I know it’s late, but for anyone who’s still suffering from this same problem, it’s seem to be a bug with Dbeaver or could be one...
Everytime I copy and paste the database and the username I get this exactly error! When I type it directly in the field I can connect successfully.
I would try this before getting mad
Solution 3:[3]
If you wanna fix this warning to all connections (not just single one) you need to configure driver's general properties.
In dbeaver go to Database -> Driver Manager
Tab
Driver properties
, Add new User propertypasswordCharacterEncoding
:UTF-8
Voila, it works for all connections use edited driver
Source: mariaDB driver's parameters
Solution 4:[4]
I think it's an encoding issue.
Before you create a new connection you should check the preferences here: encoding preferences
It worked for me as I changed it to UTF-8.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Justin Mathew |
Solution 2 | lenosane |
Solution 3 | GetoX |
Solution 4 | guinru |