为啥不查官方文档呢?
https://dev.mysql.com/doc/refman/8.4/en/problems-connecting.html> After a fresh installation, if you try to log on to the server as root without using a password, you might get the following error message.(全新安装后,如果您尝试以不使用密码的方式登录服务器 root ,则可能会收到以下错误消息。)
```
$> mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
```
> If you get the following error, it means that you are using an incorrect root password (如果出现以下错误,则表示您使用的 root 密码不正确)
```
$> mysqladmin -u root -pxxxx ver
Access denied for user 'root'@'localhost' (using password: YES)
```