CentOS 通过 yum 安装 Mysql 5.0
时间:2010-07-18 来源:pengranxiang
记录一下步骤,备忘。
1. 首先配置一下 yum 的源,指向光驱。
(1) 光驱中放入系统盘
(2) mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
(3) 备份一下 yum 原始配置:
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
(4) 修改配置 vim /etc/yum.repos.d/CentOS-Base.repo
在文件末尾添加如下内容:
[DVDROM] name=myyum baseurl=file:///mnt/cdrom/ gpgcheck=0 enabled=1
好了,配置完成。
2. 使用 yum 命令安装 mysql
yum groupinstall mysql
分析完后,可能有个下载询问, 更新一点内容,内容不大。输入 y [回车]
mysql就自动装好了, 太方便了。
3. 查看一下有没有mysql服务
chkconfig --list | grep mysql
mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
4. 启动mysqld
/etc/init.d/mysqld start
starting MySQL: [ok]
5. 修改root账号密码
mysqladmin -u root password '123456'
6. 连接到mysql
mysql -u root -p
输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
好了,内容就到这里了。

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />
飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />
飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />
飞行射击 下载- 4 <img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />下载73.78MB · 91℃
1970-01-01
- 5 <img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />下载43.7 MB · 94℃
1970-01-01
- 6 <img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />下载110.69MB · 96℃
1970-01-01