'Access denied' to jdbc:mariadb socket connection in DBeaver. OK from shell.
See original GitHub issueI’ve got MariaDB 10.2.12 installed on linux.
It’s set up for socket access,
ls -al /var/run/mariadb/mariadb.sock
srwxrwxrwx 1 mysql mysql 0 Jan 6 12:19 /var/run/mariadb/mariadb.sock=
Via shell, socket connection works perfectly,
mysql -h localhost -u root -D mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1371
Server version: 10.2.12-MariaDB-log Source distribution
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [mysql]>
I’m trying to get a socket connection to it using DBeaver 4.3.2 GUI.
I’ve got JDK 1.8 installed
java -version
OpenJDK Runtime Environment (IcedTea 3.6.0) (build 1.8.0_151-b12 suse-281.2-x86_64)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
I grabbed latest MariaDB Connector-j,
ls -al /root/.dbeaver-drivers/maven/maven-central/org.mariadb.jdbc/mariadb-java-client-2.2.1.jar
-rw-r--r-- 1 root root 553K Dec 22 03:48 /root/.dbeaver-drivers/maven/maven-central/org.mariadb.jdbc/mariadb-java-client-2.2.1.jar
In Dbeaver, I have a DB connection defined:
@Database connection settings ->
Server Host: localhost
Port: 3306
Database: mysql
User name: root
Password: xxxxxxxx
Local Client: /usr/local/mariadb
Driver Name: MariaDB
@Database connection settings -> Edit Driver Settings
Driver Name: MariaDB Driver Type: MySQL
ClassName: org.mariadb.jdbc.Driver
URL Template: jdbc:mariadb://localhost:3306/mysql?socket=/var/run/mariadb/mariadb.sock
DefaultPort: 3306 [ ] Embedded
Libraries
/root/.dbeaver-drivers/maven/maven-central/org.mariadb.jdbc/mariadb-java-client-2.2.1.jar
But when I try to access the connection, I just get:
"Could not connect: Access denied for user 'root'@'localhost'"
What am I missing in my DBeaver config?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Cannot connect to MariaDB instance from Dbeaver using ...
Is it because of some password hashing algorithms mismatch between DBeaver and MariaDB's instance? How do I fix this and connect successfuly?
Read more >How to enable Remote access to your MariaDB/MySQL ...
By default, MariaDB allows connection only from localhost, all connections from a remote server are denied by default. The first thing you need ......
Read more >Cannot get connection for URL jdbc:mysql - Access denied
Hi,. I connect locally with a Database with VPN. Test connector is OK. TestConnection But when I try a SELECT, connection error appears:....
Read more >How to connect to a remote MySQL database with DBeaver
Connecting DBeaver to your server The first thing you must do is have your MySQL configured to allow remote connections. I've already covered ......
Read more >Security, Identity, & Compliance – AWS Database Blog
To use an SSL connection over JDBC, you must create a keystore, and trust the Amazon RDS root CA certificate.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
its 2020, I’m on linux mint, dbeaver community version 7 and this bullshit is still unresolved even by trying the stuff above… why the frickin hell do I have to go through debugging this stuff right after installing mariadb???
After a little digging, it’s not
It’s
fyi
Once that’s changed, I get a connection.