登录MySQL执行命令
mysql -u root -p
出现了 Access denied for user 'root'@'localhost' (using password: YES)
解决方法,将命令改为
mysql -uroot
成功
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.41 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.