参考:
http://www.blogjava.net/amigoxie/archive/2013/02/22/395605.html
http://bbs.aliyun.com/read/177043.html?spm=5176.7189909.0.0.ZiC5I8
1, 在线下载mysql
wget –c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.10-1.rhel5.x86_64.rpm/from/http://cdn.mysql.com
wget –c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.10-1.rhel5.x86_64.rpm/from/http://cdn.mysql.com
wget –c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.10-1.rhel5.x86_64.rpm/from/http://cdn.mysql.co
1,
执行:yum install libaio
2,rpm -ivh MySQL-server-5.6.10-1.rhel5.x86_64.rpm
安装完成后会生成root用户的随机密码,请使用“cat /root/.mysql_secret”或类似命令进行查看。
3,
rpm -ivh MySQL-client-5.5.28-1.rhel5.i386.rpm
4,rpm -ivh MySQL-devel-5.5.28-1.rhel5.i386.rpm
MySQL的几个重要目录
(1)数据库目录
/var/lib/mysql/
(2)配置文件
/usr/share/mysql(mysql.server命令及配置文件)
(3)相关命令
/usr/bin(mysqladmin mysqldump等命令)
(4)启动脚本
/etc/rc.d/init.d/(启动脚本文件mysql的目录)
若想查看MySQL安装到哪个目录,可使用“whereis mysql”命令查看,参考执行结果如下所示:
[[email protected] mysql]# whereis mysql
mysql: /usr/bin/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz