sql-parser
sql-parser copied to clipboard
Missing comma before start of a new alter operation. (near "BY" at position 68) and Unrecognized alter operation. (near "BY" at position 68)
sql query written:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
-- then
FLUSH PRIVILEGES;
same problem, is there no other way ??
same problem, is there no other way ??
Are you using phpMyAdmin or the parser directly?
I am getting this same error, can you help?
I managed to change the password of a user with the following query:
SET PASSWORD FOR 'root'@'localhost' = 'magento2';
Reference: https://dev.mysql.com/doc/refman/8.0/en/set-password.html
But still I would like to know why it is showing error for the statement: ALTER USER 'root'@'localhost' IDENTIFIED BY 'magento2';
@williamdes , is there any chance for you to test phpMyAdmin with the incoming sql-parser 5.8 please?
Using this version of the parser, do you still have the error please? I wonder if this MR didn't fix this issue.
Well, I used the CLI and it seems like not
echo 'ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
-- then
FLUSH PRIVILEGES;' | ./bin/lint-query
#1: Virgule manquante avant le début d’une nouvelle opération ALTER. (near "BY" at position 64)
#2: Opération ALTER non reconnue. (near "BY" at position 64)
I don't know if you were running that on an non-rebased branch or something, but I just run that command on master
branch today:
php ./bin/lint-query --query "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
-- then
FLUSH PRIVILEGES;"
and everything worked like a charm.
@williamdes Can you double check that being sure you're on the latest version?
I don't know if you were running that on an non-rebased branch or something, but I just run that command on
master
branch today:php ./bin/lint-query --query "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword'; -- then FLUSH PRIVILEGES;"
and everything worked like a charm.
@williamdes Can you double check that being sure you're on the latest version?
This command outputs nothing on 5.x and 6.x What does it throw on your end ?
It output nothing neither on my side, which means there are no parsing error, which is the expected behavior. The query, and thoses statements, are correct.
I think it's now fixed @soumya1810 could you confirm with the latest 5.2 version in development (phpMyAdmin 5.2+snapshot) also available as a non official docker image ?