1.命令apt-get删除mysql
sudo apt-get remove --purge mysql-\*
2.手动删除mysql剩余文件
sudo find / -name mysql -print
sudo rm -rf /ect/init.d/mysql
3、重新安装
sudo apt-get install mysql-server mysql-client
4、查看
5、设置远程访问权限
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘pwd‘ with grant option;
6、修改配置文件
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf