在Fedora8上安装MySQL5.0.45的过程

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介:

本来想安装最新的5.6.13-1版本,下载下来后,依赖的包rpmlib无处下载,无法只得作罢。从Foreda8的安装光盘中找到了以下文件:

mysql-5.0.45-4.fc8.i386.rpm

mysql-connector-java-3.1.12-3.fc6.i386.rpm

mysql-connector-odbc-3.51.14r248-2.fc8.i386.rpm

mysql-libs-5.0.45-4.fc8.i386.rpm

mysql-server-5.0.45-4.fc8.i386.rpm

估计安装好MySQL有上面这些包就行了。

首先执行的是# rpm -ivh mysql-5.0.45-4.fc8.i386.rpm 
warning: mysql-5.0.45-4.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
        perl(DBI) is needed by mysql-5.0.45-4.fc8.i386

于是又到光盘里找来了perl-DBI-1.58-2.fc8.i386.rpm ,继续安装。

# rpm -ivh perl-DBI-1.58-2.fc8.i386.rpm 
warning: perl-DBI-1.58-2.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:perl-DBI               ########################################### [100%]

这回不错,没啥问题了。再次安装mysql-5.0.45-4.fc8.i386.rpm看看:

# rpm -ivh mysql-5.0.45-4.fc8.i386.rpm 
warning: mysql-5.0.45-4.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
        file /usr/bin/mysql_config from install of mysql-5.0.45-4.fc8 conflicts with file from package MySQL-devel-advanced-5.6.13-1.rhel5
        file /usr/share/man/man1/mysql_config.1.gz from install of mysql-5.0.45-4.fc8 conflicts with file from package MySQL-devel-advanced-5.6.13-1.rhel5

原来是和之前安装的MySQL-devel-advanced-5.6.13-1.rhel5冲突了,于是执行下面命令删掉它。

# rpm -e MySQL-devel-advanced-5.6.13-1.rhel5

接下来再安装mysql-server-5.0.45-4.fc8.i386.rpm

# rpm -ivh mysql-server-5.0.45-4.fc8.i386.rpm 
warning: mysql-server-5.0.45-4.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
        mysql = 5.0.45-4.fc8 is needed by mysql-server-5.0.45-4.fc8.i386
        perl-DBD-MySQL is needed by mysql-server-5.0.45-4.fc8.i386

又少一个perl-DBD-MySQL,从光盘中找来了perl-DBD-MySQL-4.005-2.fc8.1.i386.rpm 继续安:

# rpm -ivh perl-DBD-MySQL-4.005-2.fc8.1.i386.rpm 
warning: perl-DBD-MySQL-4.005-2.fc8.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:perl-DBD-MySQL         ########################################### [100%]

OK,万里长征又前进了一步,再安装mysql-5.0.45-4.fc8.i386.rpm,成功了

# rpm -ivh mysql-5.0.45-4.fc8.i386.rpm 
warning: mysql-5.0.45-4.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:mysql                  ########################################### [100%]

这把取得阶段性成果了。然后执行

# rpm -ivh mysql-server-5.0.45-4.fc8.i386.rpm 
warning: mysql-server-5.0.45-4.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:mysql-server           ########################################### [100%]

呦西,看来安上了。看看3306端口有没有被监听:

# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 0.0.0.0:59782               0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
tcp        0      0 :::22                       :::*                        LISTEN  

没有,估计安好后MySQL没有自动启动。

进入目录:

# cd /etc/rc.d/init.d

执行# ./mysqld start   (Usage: ./mysqld {start|stop|status|condrestart|restart}

Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
                                                           [  OK  ]
Starting MySQL:                                            [  OK  ]

再看看端口3306

# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 0.0.0.0:59782               0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
tcp        0      0 :::22                       :::*                        LISTEN     

再在命令行里输入MySQL,mysql的命令行就出来了。

执行show databases;

熟悉的information_schma,mysql,test就显示出来了。

到此安装成功。

如果上文有什么问题或是疑点,请指点,先谢谢了。















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/xiandedanteng/p/3267871.html,如需转载请自行联系原作者


相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
11天前
|
SQL 存储 关系型数据库
MySQL Cluster集群安装及使用
MySQL Cluster集群安装及使用
|
12天前
|
存储 关系型数据库 MySQL
mysql安装教程mac
【4月更文挑战第21天】
|
3天前
|
SQL 关系型数据库 MySQL
【MySQL-3】图形化界面工具DataGrip安装&配置&使用
【MySQL-3】图形化界面工具DataGrip安装&配置&使用
|
3天前
|
关系型数据库 MySQL Linux
【MySQL-2】MySQL的下载&安装&启停&配置环境变量【一条龙教程】
【MySQL-2】MySQL的下载&安装&启停&配置环境变量【一条龙教程】
|
4天前
|
弹性计算 关系型数据库 MySQL
在线安装MySQL5.7和MySQL8.0
【4月更文挑战第30天】
15 0
|
4天前
|
存储 关系型数据库 MySQL
docker安装mysql8忽略大小写
docker安装mysql8忽略大小写
|
4天前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 20.04 + mysql8 安装以及配置大小写不敏感
Ubuntu 20.04 + mysql8 安装以及配置大小写不敏感
|
4天前
|
关系型数据库 MySQL 开发工具
Docker安装mysql8.0
Docker安装mysql8.0
|
4天前
|
弹性计算 关系型数据库 MySQL
在线安装mysql-5.6
【4月更文挑战第30天】
9 0
|
4天前
|
关系型数据库 MySQL 应用服务中间件
centos7在线安装jdk1.8+tomcat+mysql8+nginx+docker
现在,你已经成功在CentOS 7上安装了JDK 1.8、Tomcat、MySQL 8、Nginx和Docker。你可以根据需要配置和使用这些服务。请注意,安装和配置这些服务的详细设置取决于你的具体需求。
21 2