中国科学院大学计算机硕士,曾在新浪爱彩数据库组带DBA团队,现居新加坡。wx: lihui_dba
分类: Mysql/postgreSQL
2019-12-24 02:50:45
在一些非常规安装时会遇到这个莫名其妙的问题:OS是Ubuntu,MySQL版本是5.7.26。
安装后MySQL的error log提示:[Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
解决:
# sudo mysql -uroot
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password;
mysql> alter user root@localhost identified with mysql_native_password as '*xxxxx';