RHEL4下安装MySQL

1、下载服务器端及客户端两个文件:



wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.29-0.rhel4.x86_64.rpm/from/http://mysql.ntu.edu.tw/
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-community-5.1.29-0.rhel4.x86_64.rpm/from/http://mysql.ntu.edu.tw/






你也可以到这里下载你需要的版本http://dev.mysql.com/downloads/mysql/5.1.html#linux-rhel4-x86-64bit-rpms




2、安装客户端

    如果已经安装某个版本的MySql则卸载:

# rpm -qa|grep mysql
mysqlclient10-3.23.58-4.RHEL4.1
mysql-4.1.20-1.RHEL4.1
# rpm -e mysqlclient10-3.23.58-4.RHEL4.1
# rpm -e mysql-4.1.20-1.RHEL4.1

 

由于,没有注册码,不能安装上面下载的RPM包,只好下载非RPM包来安装,下面拷自官方文档:

 

安装步骤

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &

 

  自动启动:

If you install MySQL from a source distribution or using a binary distribution format that does not install mysql.server automatically, 
you can install it manually. The script can be found in the support-files directory under the MySQL installation directory or in a 
MySQL source tree.

To install mysql.server manually, copy it to the /etc/init.d directory with the name mysql, 
and then make it executable. Do this by changing location into the appropriate directory 
where mysql.server is located and executing these commands:

shell> cp mysql.server /etc/init.d/mysql
shell> chmod +x /etc/init.d/mysql

shell> chkconfig --add mysql

 

虽然成功,尚待整理总结。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值