Home > Database > Mysql Tutorial > RedHat Linux 6.1 安装MySQL

RedHat Linux 6.1 安装MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:18:36
Original
1263 people have browsed it

环境 RedHat Linux 6.1 MySQL 5.1.7 问题 RedHat Linux 6.1 安装 MySQL 安装前准备 1. 下载资源: MySQL-server-5.1.7-0.i386.rpm,点此下载。 MySQL-client-5.1.7-0.i386.rpm,点此下载。 2. 登录系统检查是否已经安装了 MySQL 3. 将两个安装文件拷贝到自己

环境

 

RedHat Linux 6.1 + MySQL 5.1.7

 

问题

 

RedHat Linux 6.1安装MySQL

 

安装前准备

 

1.下载资源:

MySQL-server-5.1.7-0.i386.rpm,点此下载。

 

MySQL-client-5.1.7-0.i386.rpm,点此下载。

 

2.登录系统检查是否已经安装了MySQL

 

3.将两个安装文件拷贝到自己的目录下。

 

正式安装

 

1. 安装服务端,rpm -ivh MySQL-server-5.1.7-0.i386.rpm 

显示如下信息。

 

warning: MySQL-server-5.1.7-0.i386.rpm

signature: NOKEY, key ID 5072e1f5 

Preparing...       ########################################### [100%] 

1:MySQL-server       ########################################### [100%]

Copy after login


 

 

检查是否成功安装:ps –aux | grep “mysql”

 

2.安装客户端,rpm -ivh MySQL-client-5.1.7-0.i386.rpm

显示如下信息。

 

warning: MySQL-client-5.1.7-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 

Preparing...    ########################################### [100%] 

1:MySQL-client     ########################################### [100%]
Copy after login


 

 

3.登录MySQLmysql –uroot –p,直接回车,

 

Welcome to the MySQL monitor. Commands end with ; or \g. 

Your MySQL connection id is 1 to server version: 5.1.7-standard 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 

mysql>
Copy after login


 

 

4.修改密码,mysqladmin -u root password 'new-password'

 

格式:mysqladmin -u用户名 -p旧密码 password 新密码

如 mysqladmin –u root –p root(因无初始密码,所以旧密码为空)
Copy after login


 

 

 

5.启动、停止、重启MySQL

 

启动:service mysqld start

停止:service mysqld stop

重启:service mysqld restart
Copy after login


 

 

参考资料

 

http://rq2-79.iteye.com/blog/175869

 

http://www.jz123.cn/text/3035482.html

 

http://www.jb51.net/os/RedHat/1262.html

 

 

RedHat Linux 6.1 安装MySQL RedHat Linux 6.1 安装MySQL  RedHat Linux 6.1 安装MySQL
@Wentasy
Related labels:
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