1:卸载:
整体删除:rpm -e --nodeps mysql
查看安装的mysql安装:rpm -p | grep mysql
单个删除:rpm -e --nodeps 包名
2:挂载 red hat5 碟中 find -name *msyql*找到 以下几个包
拷贝到你自己的目录下 cp 目标文件 目地路径
mysql-5.0.77-4.el5_4.2.i386.rpm
mysql-bench-5.0.77-4.el5_4.2.i386.rpm
mysql-connector-odbc-3.51.26r1127-1.el5.i386.rpm
mysql-devel-5.0.77-4.el5_4.2.i386.rpm
mysql-server-5.0.77-4.el5_4.2.i386.rpm
mysql-test-5.0.77-4.el5_4.2.i386.rpm
perl-DBD-MySQL-3.0007-2.el5.i386.rpm
在网上 下载server安装前要的包
MySQL-shared-compat-5.1.47-1.rhel5.x86_64.rpm
rpm -ivh 包名 :一个个安装即可,顺序有问题会提示的
启动:service mysqld start
设置root 密码:/usr/bin/mysqladmin -u root password '123456'
登录:mysql -u root -p123456
3:test使用mysql
show databases;
create xinku;
use xinku;
create table biaoming (id int(4) , name varchar(10));
describe biaoming;
insert into biaoming(1,'xiaoming');
show tables;
select * from biaoming;
delete from biaoming where id=1;
drop table biaoming;
drop table xinku;