centos rpm mysql linux-generic_Centos 下rpm方式安装MySQL

CentOS/Linux下面用rpm方法安装mysql5.1

首先还是要下载,因为我是64位的Linux,所以下载的是64bit的版本,需要下三个文件server和

64bit mysql 下载地址

MySQL-server-community-5.1.36-0.rhel5.x86_64.rpm

MySQL-client-community-5.1.36-0.rhel5.x86_64.rpm

MySQL-devel-community-5.1.36-0.rhel5.x86_64.rpm

32bit和更多下载镜像,请自己上www.mysql.com下载

这里预设下载目录为/usr/local/src/

依次执行以下命令

#下载所需rpm包

cd /usr/local/src/

#开始安装

rpm -ivh MySQL-server-community-5.1.36-0.rhel5.x86_64.rpm MySQL-client-community-5.1.36-0.rhel5.x86_64.rpm MySQL-devel-community-5.1.36-0.rhel5.x86_64.rpm

然后运行一下mysql看是否安装成功

mysql

提示:

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

Your MySQL connection id is 8

Server version: 5.1.36-community-log MySQL Community Server (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

即为安装成功

修改登录密码:

mysqladmin -u root password ‘new-password’

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

再次登录

mysql -u root -p

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值