Jump to content
Froxlor Forum
  • 0

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'


Rob Steele

Question

During the initial install I can't get past this message: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

image.png.d32d8bf28bf2cbe360aef9401006f57f.png

I am able to login fine with that password using:

mysql -u root -p

Is there something else I should be checking for credentials ?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks d00p! But I tried what you outlined and had the same outcome, these were the commands I used:

root@hosting:/# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> update mysql.user set password=password('password') where user='root';
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
mysql> update mysql.user set plugin='' where user='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit


 

Link to comment
Share on other sites

  • 0
14 minutes ago, Rob Steele said:

update mysql.user set plugin='' where user='root';

This is the important part of you have already set a password.

Alternatively, just add a new user with privileges to create databases and users (root is a bit special)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...