Wednesday, February 16, 2022

[SOLVED] PHPMyAdmin Configuration not working because of MySQL user password?

Issue

Hello stackoverflow-community!

When I try to install and afterwards configure my phpmyadmin on my debian server I always get this error-message.

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near 'IDENTIFIED BY 'debian123'' at line 1

here a screenshot of it

I am using: debian version: 9 ; MySql version: 8.0.19

What I tried:

  • deleted phpmyadmin and reinstalled it
  • tried another statement to grant privileges to the user

I hope you can help me with my problem, because I am struggeling with it quite a while.

thank you in advance

~HTL_Krems_Engineer


Solution

This is a change with newer versions of MySQL.

You can no longer use grant x on y.z to username identified by 'debian123'.

You have to split the user creation into multiple steps.

Your MySQL should look like this instead:

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;


Answered By - Joundill
Answer Checked By - Marilyn (WPSolving Volunteer)