博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在Fedora8上安装MySQL5.0.45的过程
阅读量:5899 次
发布时间:2019-06-19

本文共 4479 字,大约阅读时间需要 14 分钟。

本来想安装最新的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就显示出来了。

到此安装成功。

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

转载地址:http://vfesx.baihongyu.com/

你可能感兴趣的文章
JAVA 设计模式 策略模式
查看>>
openstack nova修改实例路径,虚拟磁盘路径
查看>>
java.sql.SQLException: Lock wait timeout exceeded --转
查看>>
使用C#进行图像处理的几种方法(转)
查看>>
Ajax原理学习
查看>>
sap scriptfom 多语言翻译
查看>>
实现超级简单的bug管理系统
查看>>
图像滤镜艺术---(Lightleaks Filter)漏光滤镜
查看>>
[LeetCode] Find Anagram Mappings 寻找异构映射
查看>>
--Too small initial heap for new size specified
查看>>
黄聪:3分钟学会sessionStorage用法
查看>>
Entity Framework 全面教程详解(转)
查看>>
Windows上Python2.7安装Scrapy过程
查看>>
Chapter 3:Code Style in Django
查看>>
FIDO联盟拥抱政府监管,全面打造安全可信网络
查看>>
BlackNurse新型DoS攻击 15M流量就可以打瘫思科防火墙 思科做出了回应
查看>>
Interop 2015:思科为其SDN架构做好安全防护
查看>>
Windows 10中国普及速度慢 原因是盗版难
查看>>
第19届亚太反病毒研究者联盟(AVAR)国际大会开幕在即
查看>>
解决 WordPress 升级更新后“添加媒体”按钮失效问题
查看>>