mysql linux 下 安装与卸载 转:http://blog.csdn.net/tianlesoftware/article/details/7001808#t2
一.下载说明 前期的一些准备说明,参考: MySQL 发展史 http://blog.csdn.net/tianlesoftware/article/details/6999245
Mysql 不同版本 说明 http://blog.csdn.net/tianlesoftware/article/details/6723117 MySQL 分为Community Server 和 Enterprise Edition。 其中Community Server 可以直接从mysql 的官网下载。Enterprice Edition 只能从Oracle edelivery上下载,不过Edelivery 现在已经屏蔽了中国的IP,如果国内的用户一般不能从edelivery上下载,需要fq出去才能下载。
Linux supports anumber of different solutions for installing MySQL. The recommended method isto use one of the distributions from Oracle. If you choose this method, thereare three options available: (1)Installingfrom a generic binary package in .tar.gz format. See Section 2.2,“Installing MySQL from Generic Binaries on Unix/Linux” for moreinformation. (2)Extractingand compiling MySQL from a source distribution. For detailed instructions,see Section 2.9, “InstallingMySQL from Source”. (3)Installingusing a pre-compiled RPM package. For more information on using the RPMsolution, see Section 2.5.1,“Installing MySQL from RPM Packages on Linux”. --这里讲了3种方式来安装MySQL数据库,我这里用最简单的RPM 包来安装。
As analternative, you can use the native package manager within your Linuxdistribution to automatically download and install MySQL for you. Nativepackage installations can take of the download and dependencies required to runMySQL, but the MySQL version will often be some way behind the currentlyavailable release. You will also normally be unable to install developmentalreleases, as these are not usually made available in the native repository. Formore information on using the native package installers, see Section 2.5.2,“Installing MySQL on Linux using Native Package Manager”.
Note For many Linux installations,you will want to set up MySQL to be started automatically when your machinestarts. Many of the native package installations perform this operation foryou, but for source, binary and RPM solutions you may need to set this upseparately. The required script, mysql.server,can be found in the support-filesdirectory under the MySQL installationdirectory or in a MySQL source tree. You can install itas/etc/init.d/mysql for automatic MySQL startup and shutdown. See Section 2.10.1.2,“Starting and Stopping MySQL Automatically”. --这里要注意一个问题,就是设置MySQL的自启动。 如果使用native package来安装,会自动设置为自启动,如果使用其他的方式,如source,binary和RPM,就需要单独的来设置自启动。
1.2 下载安装包 我这里下载Community Server 版的,Enterprise Edition版的请到Oracle E-Delivery上下载。Enterprise Edition 有30天的试用期。
Community Server下载地址:http://www.mysql.com/downloads/mysql/
这里要注意的,MySQL的Tar 包还是比较大,要比RPM包大3倍左右。
MySQL 的RPM 包有如下几个:
看一下每个rpm 包具体的描述: (1)MySQL-server-VERSION.glibc23.i386.rpm The MySQLserver. You need this unless you only want to connect to a MySQL server runningon another machine.
(2)MySQL-client-VERSION.glibc23.i386.rpm The standardMySQL client programs. You probably always want to install this package.
(3)MySQL-devel-VERSION.glibc23.i386.rpm The librariesand include files that are needed if you want to compile other MySQL clients,such as the Perl modules.
(4)MySQL-debuginfo-VERSION.glibc23.i386.rpm This packagecontains debugging information. debuginfo RPMs are never needed touse MySQL software; this is true both for the server and for client programs.However, they contain additional information that might be needed by a debuggerto analyze a crash.
(5)MySQL-shared-VERSION.glibc23.i386.rpm This packagecontains the shared libraries