解决方法:
在[mysqlld]段下增加如下代码:skip-grant-tables;
1.which mysql
查看mysql位置,例如:/opt/lampp/bin/mysql
2.进入配置mysql:
cd /opt/lampp/bin/
vim mysql_config
3.在socket='/opt/lampp/var/mysql/mysql.sock'下添加、
skip-grant-tables
4.
停止xampp:
/opt/lampp/./lampp stop
启动xampp:
/opt/lampp/./lampp start
参考网址:https://blog.csdn.net/weixin_40679412/article/details/94868910
http://keep.01ue.com/?pi=389227&_a=app&_c=index&_m=p