在ubuntu服务器上配置mysql

sudo su root
dpkg -i mysql-apt-config_0.8.12-1_all.deb
apt-get install mysql-server
apt-get install mysql-client
apt-get install libmysqlclient-dev
use mysql;
desc user;
select host,user from user;
update user set host='%' where user='root';
grant all privileges on *.* to 'root'@'%';
flush privileges;