apt-get remove --purge mysql* && apt-get autoremove && apt-get autoclean
rm -rf /var/lib/mysql/
apt-get update && apt-get install mysql-server
密码设置为123456
vim /etc/mysql/my.cnf
修改bind-address=0.0.0.0
,增加大小写不敏感[mysqld] lower_case_table_names=1
mysql -uroot -p123456
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';
flush privileges;
exit
/etc/init.d/mysql restart