#适用于centos操作系统,使用前判断网络是否通畅
#search
yum search mysql
# install
yum install -y mysql-server.x86_64 mysql.x86_64
# start mysql service
service mysqld start
# grant
mysql -e "grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;"
# close firewald
service iptables stop
service ip6tables stop
chkconfig --level 2345 iptables off
chkconfig --level 2345 ip6tables off
# autostart
chkconfig --level 2345 mysqld on