Reputation: 23
I want to create a database for a simple authentication system but I just keep getting errors regarding the syntax and I can't find the appropriate one.
I connect to MySQL using : mysql -u root -p
with the password being : R2pay(XF%jVh
(I got it at some point don't remember how)
Then I type CREATE DATABASE Filelist;
and I get this error :
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
So I am like okay, I just have to change my password, but things get worse.
When I type this SET PASSWORD = PASSWORD ('123456');
I get :
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
I try to use a different method with ALTER USER 'root'@'localhost' IDENTIFIED BY 'elma3alem' PASSWORD EXPIRE;
and I get :
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 'ALTER USER 'root'@'localhost' IDENTIFIED BY 'elma3alem' PASSWORD EXPIRE' at line 3
Even when I try to fix the "policy" problem with uninstall plugin validate_password;
for example I get another error :
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
I am really getting desperate, everytime I try to find a solution I end up with even more errors, can't even count how much time I spent trying to fix mysql problems...
BTW this is what mysql --version displays
:
mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper
Thanks beforehand.
Upvotes: -1
Views: 1156
Reputation: 1
At last ,I find it.... In this doc: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html this command works:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
enjoy it!
Upvotes: 0
Reputation: 170
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Means you paswword is too simple did you tryed another one like 'Draga123456'?
Upvotes: 0