May 6

How to Fix Adminer root@localhost login issue

So, after having successfully installed adminer, you can’t login. That happens and here is the simple fix:

Login to your mysql server as root:
[sourcecode language=”plain”]mysql -u root[/sourcecode]

Remove the root user:
[sourcecode language=”plain”]mysql> DROP USER ‘root’@’localhost’;
Query OK, 0 rows affected (0,00 sec)[/sourcecode]

Recreate the root user;
[sourcecode language=”plain”]mysql> CREATE USER ‘root’@’%’ IDENTIFIED BY ”;
Query OK, 0 rows affected (0,00 sec)[/sourcecode]

Grant permissions to your user:
[sourcecode language=”plain”]mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION;
Query OK, 0 rows affected (0,00 sec)[/sourcecode]

Flush privileges:
[sourcecode language=”plain”]mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,01 sec)[/sourcecode]

You may now exit from the mysql console:
[sourcecode language=”plain”]mysql> exit;[/sourcecode]

solution originally posted from : AskUbuntu



Copyright 2019. All rights reserved.

Posted May 6, 2018 by Loki in category "Database", "Management", "Ubuntu

Leave a Reply