MySQL 8 create new user with password not working : <p>I am using MySQL for several years and the command for the creating the new user till the MySQL 5.x version is as follow:</p>

<pre><code>GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
</code></pre>

<p>Recently I installed the MySQL 8. In that, this command is not working.</p>

<p>It is throwing following error while firing above command:</p>

<pre><code>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 'password'' at line 1
</code></pre>

<p>Is there any change of syntax in MySQL 8? What is the correct syntax for creating new user command in MySQL 8?</p>

<p>Note: I tried this syntax in MySQL 5.x versions. It is working correctly in that.</p>
