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

4
  • Why are you trying to login as root? Mar 17, 2021 at 7:53
  • 1
    Does this answer your question? Access denied for user 'root'@'localhost' (using password yes)
    – John K. N.
    Mar 17, 2021 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, 2021 at 19:56
  • @DeltaFlyer Don’t run your program as root if you can run it as a normal non-privileged user. Aug 31, 2021 at 20:19

1 Answer 1

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.

1
  • 4
    Please add some details to the answer, as link-only answers can become obsolete. Thanks.
    – John K. N.
    Mar 17, 2021 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.