ALTER USER USER() IDENTIFIED BY 'password';

[root@test mysql]# bin/mysqld
2018-08-04T14:09:33.831318Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2018-08-04T14:09:33.831523Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.0.12-linux-glibc2.12-x86_64/bin/mysqld (mysqld 8.0.12) starting as process 2134
2018-08-04T14:09:34.475674Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-08-04T14:09:34.497799Z 0 [System] [MY-010931] [Server] /usr/local/mysql-8.0.12-linux-glibc2.12-x86_64/bin/mysqld: ready for connections. Version: '8.0.12' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server - GPL.

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

原文地址:https://www.cnblogs.com/rsapaper/p/9420448.html