解决ERROR 29 (HY000): File './mysql/user.MYD' not found问题
问题:修改密码./mysql/user.MYD' not found
Enter password:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql>
mysql> flush privileges;
ERROR 29 (HY000): File './mysql/user.MYD' not found (Errcode: 2 - No such file or directory)
数据损坏,Mysql卸载干净重装
卸载MySQL
一.在系统偏好设置找到MySQL服务—>停止
二.打开终端
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
三.一定要重启电脑 否则重新安装依旧有问题
四.重新安装MySQL即可