Specify the password

suggest change

The basic usage is:

mysql> CREATE USER 'my_new_user'@'localhost' IDENTIFIED BY 'test_password';

When the password should not appear in cleartext, MySQL 5.7 accepts the hash from PASSWORD():

mysql> SELECT PASSWORD('test_password'); -- returns *4414E26EDED6D661B5386813EBBA95065DBC4728
mysql> CREATE USER 'my_new_user'@'localhost' IDENTIFIED BY PASSWORD '*4414E26EDED6D661B5386813EBBA95065DBC4728';

PASSWORD() and IDENTIFIED BY PASSWORD were removed in 8.0. Pass the hash with the plugin name:

CREATE USER 'my_new_user'@'localhost' IDENTIFIED WITH mysql_native_password AS '*4414E26EDED6D661B5386813EBBA95065DBC4728';

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents