Specify the password
suggest changeThe 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';
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents