Home > Database > Mysql Tutorial > suse9上安装和卸载Mysql

suse9上安装和卸载Mysql

WBOY
Release: 2016-06-07 15:46:52
Original
1036 people have browsed it

首先suse9上自带了Mysql 4点几的一个版本,所以在安装时先确认服务器上是否已经存在Mysql数据库 执行ps- ef | grep mysqlid 或者netstat -lnp | grep mysql查看。 如果已存在而又不是想要的版本则先卸载 --卸载:先查看然后 逐个使用 rpm -e mysq-* 卸载 rpm

     首先suse9上自带了Mysql 4点几的一个版本,所以在安装时先确认服务器上是否已经存在Mysql数据库

执行 ps- ef | grep mysqlid 或者netstat -lnp | grep mysql查看。

     如果已存在而又不是想要的版本则先卸载

 

   --卸载:先查看然后 逐个使用 rpm -e mysq-* 卸载
rpm -qa | grep mysql
rpm -e perl-DBD-mysql-2.9003-22.1 --nodeps
rpm -e mysql-shared-4.0.18-32.30 --nodeps
rpm -e python-mysql-0.9.3b2-90.1 --nodeps
rpm -e mysql-client-4.0.18-32.30 --nodeps
rpm -e qt3-mysql-3.3.1-35.11 --nodeps
rpm -e mysql-4.0.18-32.30 --nodeps

 

到官网http://www.mysql.com/下载所需的版本(下载时看清对应的操作系统)。

 

  --安装所需版本

--打开mysql安装文件所在的目录

cd /home/mysql/

--安装
rpm -ivh MySQL-server-community-5.1.52-1.sles9.i586.rpm --replacepkgs
rpm -ivh MySQL-client-community-5.1.52-1.sles9.i586.rpm --replacepkgs
rpm -ivh MySQL-devel-community-5.1.52-1.sles9.i586.rpm --replacepkgs
 rpm -ivh MySQL-embedded-community-5.1.52-1.sles9.i586.rpm --replacepkgs
rpm -ivh MySQL-shared-community-5.1.52-1.sles9.i586.rpm --replacepkgs
rpm -ivh MySQL-shared-compat-5.1.52-1.sles9.i586.rpm --replacepkgs
rpm MySQL-test-community-5.1.52-1.sles9.i586.rpm --replacepkgs

 

 

 

成功后启动mysql服务器

--启动:
/etc/init.d/mysql start

 

第一次需要修改密码
--改密码:
/usr/bin/mysqladmin -u root password yourpassword

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