Home > Database > Mysql Tutorial > body text

Linux下安装Mysql(RPM安装)_MySQL

WBOY
Release: 2016-06-01 11:52:25
Original
1512 people have browsed it

一、去官网下载本次安装需要的mysql版本,我们需要安装的是5.1版本的且centos系统是64位的,所以下载的是MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar

 

二、将MySQL安装包放到/home/Lee下

 

 

三、解压MySQL的tar包

#tar –xf MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar

 

四、解压后会看到如下文件

 

\

五、安装PRM包

由上图我们可以看到有8个rpm包,但是我们这里只需要安装serevr与client包即可正常使用mysql,其余的包按具体情况自己决定是否安装

#rpm –ivh MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm

#rpm –ivh MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm

 

六、设置用户密码(新安装的mysql默认用户名为root,但是密码得自己设置)

#mysqladmin -u root password ‘root’ //设置新密码为root

 

七、启动mysql

#mysql –uroot -proot

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template