安装MySQL
1、yum安装MySQL数据库
yum install mysql mysql-server mysql-devel
2、启动
/etc/init.d/mysqld start
3、进入mysql控制台:>mysql
4、设置root密码
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql> FLUSH PRIVILEGES;
5、允许远程登陆
mysql -u root -p Enter Password: <your new password> mysql> GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
6、设为开机启动
chkconfig mysqld on