骏马金龙 (新博客:www.junmajinlong.com)

网名骏马金龙,钟情于IT世界里的各种原理和实现机制,强迫症重症患者。爱研究、爱翻译、爱分享。特借此一亩三分田记录自己成长点滴!!!

You must reset your password using ALTER USER statement before executing this statement.

MySQL 5.7之后,刚初始化的MySQL实例要求先修改密码。否则会报错:

mysql> create database test;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

所以修改下密码就OK:

alter user root@localhost identified by 'P@ssword1!';
flush privileges;
posted @ 2018-06-24 18:26  骏马金龙  阅读(1558)  评论(0编辑  收藏  举报