yum list mysql*
安装mysql
yum intstall mysql-server
修改mysql密码为root
/usr/bin/mysqladmin -u root password 'root'
yum intstall mysql-server
修改mysql密码为root
/usr/bin/mysqladmin -u root password 'root'
开启root权限 (mysql内执行)
grant all privileges on *.* to root@'%' identified by 'root';
设置防火墙
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
grant all privileges on *.* to root@'%' identified by 'root';
设置防火墙
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
保存防火墙设置
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables status
service iptables restart
mysql开机启动
chkconfig mysqld on
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables status
service iptables restart
mysql开机启动
chkconfig mysqld on
把内存文件写到硬盘
sync
sync