1. bug
宝塔面板终端:通过mysql -u root -p 命令输入密码后,报错:ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

2. 解决方法
2.1 关闭数据库
service mysqld stop

2.2 设置MySQL在首页显示(方便操作)

2.3 修改MySQL配置
在[mysqld]末端添加:skip-grant-tables


2.4 重载配置并启动

2.5 完工,试试
mysql -uroot
