dpkg --get-selections | grep mysql //检查已经安装的mysql的各个文件
sudo apt-get autoremove --purge mysql-server-5.0
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove mysql-common
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P //清理文件
至此,可以在运行下 dpkg --get-selections | grep mysql
然后删除所有的mysql文件。
关于 ERROR 130 (HY000): Incorrect file format
sudo /etc/init.d/mysql stop
sudo vi /etc/mysql/my.cnf
在[mysqld]段中加入一行 skip-grant-tables
mysql -uroot -p 回车 ,可以直接进去。
UPDATE user SET password=password('1234') WHERE user='root';
如果可以修改,则修改。
不行的话 执行: REPAIR TABLE tablename USE_FRM
//未必有用,我的是修复了user表,使用的是 insert root ,退出后,依旧是有问题。。
//就此卸载了全部的mysql ,悬而未决。。