如何在Linux操作系统下对MySQL进行正确的安装,以及有对不同MySQL安装的方案的比较。
其中包括使用rpm对其进行安装,二进制安装,源码安装这三种方案的比较。
安装方法比较
一.使用rpm安装
安装简单,适合初学者学习使用
1. 需要单独下载客户端和服务器
2. 安装路径不灵活,默认路径不能修改,一台服务器只能MySQL安装一个 MySQL。
--------------------------------下面是oracle官方文档的部分指导说明:---------------------------------
文件布局
MySQL Installation Layout for Linux RPM Packages from the MySQLDeveloper Zone
Directory | Contents of Directory |
---|---|
/usr/bin |
Client programs and scripts |
/usr/sbin |
The mysqld server |
/var/lib/mysql |
Log files, databases |
/usr/share/info |
MySQL manual in Info format |
/usr/share/man |
Unix manual pages |
/usr/include/mysql |
Include (header) files |
/usr/lib/mysql |
Libraries |
/usr/share/mysql |
Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for databaseinstallation |
/usr/share/sql-bench |
Benchmarks |
MySQL Linux RPM Package Platforms
PLATFORM Value |
Intended Use |
---|---|
linux_glibc25 |
Platform independent, should run on any Linux distribution that supportsglibc 2.5 |
rhel5 |
Red Hat Enterprise Linux 5 |
el6 , el7 |
Enterprise Linux 6 or 7 |
sles11 , sles12 |
SUSE Linux Enterprise Server 11 or 12 |
In MySQL 5.6, only linux_glibc2.5
packages are available currently.
The CPU
value indicates the processor type or family for which the package is built, as shown in the following table.