首先看看安装需要用到的所有的包吧。
[root@localhost6 MysqL]# ls
MysqL-5.0.37-2.fc7.i386.rpm MysqL-server-5.0.37-2.fc7.i386.rpm unixODBC-2.2.12-2.fc7.i386.rpm
MysqL-connector-odbc-3.51.12-2.2.i386.rpm perl-DBD-MysqL-3.0008-1.fc7.i386.rpm
MysqL-libs-5.0.37-2.fc7.i386.rpm perl-DBI-1.53-2.fc7.i386.rpm
接下来就是安装数据库的过程了。因为各个包都存在着一定的依赖关系的,所以大家在安装时最好按照我的安装顺序来安装,虽然我不敢说这个是唯一正确的顺序,但是至少是可行的一个按照顺序。
[root@localhost6 MysqL]# rpm -ivh perl-DBI-1.53-2.fc7.i386.rpm
warning: perl-DBI-1.53-2.fc7.i386.rpm: Header V3 DSA signature: NOKEY,key ID 4f2a6fd2
Preparing... ########################################### [100%]
1:perl-DBI ########################################### [100%]
[root@localhost6 MysqL]# rpm -ivh perl-DBD-MysqL-3.0008-1.fc7.i386.rpm
warning: perl-DBD-MysqL-3.0008-1.fc7.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:perl-DBD-MysqL ########################################### [100%]
[root@localhost6 MysqL]# rpm -ivh MysqL-libs-5.0.37-2.fc7.i386.rpm
warning: MysqL-libs-5.0.37-2.fc7.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:MysqL-libs ########################################### [100%]
[root@localhost6 MysqL]# rpm -ivh MysqL-5.0.37-2.fc7.i386.rpm
warning: MysqL-5.0.37-2.fc7.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:MysqL ########################################### [100%]
[root@localhost6 MysqL]# rpm -ivh MysqL-server-5.0.37-2.fc7.i386.rpm
warning: MysqL-server-5.0.37-2.fc7.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:MysqL-server ########################################### [100%]
到此为止,整个MysqL已经安装完成了。接下来是启动MysqL的守护进程。过程大致如下
[root@localhost6 MysqL]# chown -R MysqL:MysqL /var/lib/MysqL
[root@localhost6 MysqL]# /etc/init.d/MysqLd start
初始化 MysqL 数据库: Installing all prepared tables
Fill help tables
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 localhost6.localdomain6 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 the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
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
[确定]
启动 MysqL: ]
当你见到上面这个页面时,恭喜你,你安装成功了。现在你只要在终端输入MysqL就可以使用了。我们来试试启动MysqL来看看。
[root@localhost6 MysqL]# MysqL
Welcome to the MysqL monitor. Commands end with ; or g.
Your MysqL connection id is 2
Server version: 5.0.37 Source distribution
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
成功启动了。
MysqL> quit;
Bye
退出成功。
但是一般情况下要进行开发必然要用其他语言来连接MysqL的,所以肯定要装odbc。安装过程如下。
[root@localhost6 MysqL]# rpm -ivh unixODBC-2.2.12-2.fc7.i386.rpm
warning: unixODBC-2.2.12-2.fc7.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:unixODBC ########################################### [100%]
[root@localhost6 MysqL]# rpm -ivh MysqL-connector-odbc-3.51.12-2.2.i386.rpm
warning: MysqL-connector-odbc-3.51.12-2.2.i386.rpm: Header V3 DSA signature: NOKEY,serif">1:MysqL-connector-odbc ########################################### [100%]
odbc也安装成功。现在你就可以使用了MysqL来进行开发了。至于怎么设置和使用,那就要看你自己对MysqL的掌握程度了,我不在这献丑了。希望这篇文章能够帮助到其他和我一样的菜鸟吧。