“IDENTIFIED BY 'password'” in MySQL
I often see in many MySQL tutorials that people use command IDENTIFIED BY 'password' both during user creation and granting him privileges. For example: CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON database.* TO 'username'@'localhost' IDENTIFIED BY 'password'; I tried using GRANT without IDENTIFIED BY and it works. Can somebody explain me why it is used twice? Could there be other password for specific privileges? GRANT is meant for adding privileges to users. Confusingly, it also has the ability to create users and change their passwords. This