先卸载:sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove (全部用一遍,卸载干净)
sudo apt-get autoclean
sudo apt remove mysql-server mysql-client
再安装:sudo apt-get install libmysqlclient-dev mysql-client
sudo apt-get install mysql-server
最后登录: sudo mysql -uroot -p