在Fedora8上安装MySQL5.0.45的过程
本來想安裝最新的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有上面這些包就行了。
首先執(zhí)行的是# 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 ,繼續(xù)安裝。
# 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沖突了,于是執(zhí)行下面命令刪掉它。
# 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 繼續(xù)安:
# 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%]
這把取得階段性成果了。然后執(zhí)行
# 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端口有沒有被監(jiān)聽:
# 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
執(zhí)行# ./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的命令行就出來了。
執(zhí)行show databases;
熟悉的information_schma,mysql,test就顯示出來了。
到此安裝成功。
如果上文有什么問題或是疑點,請指點,先謝謝了。
轉(zhuǎn)載于:https://www.cnblogs.com/xiandedanteng/p/3267871.html
總結(jié)
以上是生活随笔為你收集整理的在Fedora8上安装MySQL5.0.45的过程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HDU2819Swap(二分图最大匹配)
- 下一篇: linux cmake编译源码,linu