3

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:

enter image description here

Rick James
  • 66,863
  • 4
  • 38
  • 92
kms
  • 129
  • 3
  • 7
  • Why are you trying to login as root? – Colin 't Hart Mar 17 '21 at 07:53
  • 1
    Does this answer your question? [Access denied for user 'root'@'localhost' (using password yes)](https://dba.stackexchange.com/questions/55559/access-denied-for-user-rootlocalhost-using-password-yes) – John K. N. Mar 17 '21 at 12:05
  • @Colin'tHart, I'm not op but I tried logging in as root because you can do that in Postgres. I've dabbled with MySQL/MariaDB but I guess I forgot its best to make a new user? – DeltaFlyer Aug 31 '21 at 19:56
  • @DeltaFlyer Don’t run your program as root if you can run it as a normal non-privileged user. – Colin 't Hart Aug 31 '21 at 20:19

1 Answers1

2

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.

FloT
  • 251
  • 1
  • 3
  • 10