HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

DBeaver: Access denied for user 'root'@'localhost' (using password: YES)

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
localhostuserdbeaverdeniedpasswordyesforrootusingaccess

Problem

Context: I am creating a new Schema and looking to import .sql file generated from mysql dump. I have server running: MySQL 8.0.19.

I am using DBeaver client Version 7.0.2 and have setup a new MySQL 8+ Database connection. However, when I attempt to connect to the DB, I run into the following error:

Access denied for user 'root'@'localhost' (using password: YES)


A root user exist (verified through mysql shell). Here are a few things I have attempted, however, haven't been able to resolve the issue yet:

Solution

Create new user with password and full privileges as described here:

CREATE USER 'admin'@'localhost' IDENTIFIED BY 'the_password_you_wish_here';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;


...and login with this user for further usages.

Code Snippets

CREATE USER 'admin'@'localhost' IDENTIFIED BY 'the_password_you_wish_here';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;

Context

StackExchange Database Administrators Q#265364, answer score: 2

Revisions (0)

No revisions yet.