[Linux] 安装MySQL的一点问题?
我用的是 CentOS 5 发行版的 Linux 系统,想安装 MySQL 来学习!
在 Google 中查询后,安装 MySQL 需要下面两个文件:
MySQL-server-4.0.16-0.i386.rpm
MySQL-client-4.0.16-0.i386.rpm
我在yum源里只找到下面有关MySQL的包:
MySQL-python.i386 1.2.1-1 base
mysql.i386 5.0.45-7.el5 base
mysql-bench.i386 5.0.45-7.el5 base
mysql-connector-odbc.i386 3.51.12-2.2 base
mysql-devel.i386 5.0.45-7.el5 base
mysql-server.i386 5.0.45-7.el5 base
mysql-test.i386 5.0.45-7.el5 base
好像只有 mysql-server 包,没有 mysql-client- 包!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
就这个:
mysql.i386 5.0.45-7.el5 base
装好了可以用 rpm -ql 看看,只要有 mysql mysqladmin 等命令就可以了。
不同的版本的区别,
i386版本 和 x86_64版本
1、需要一个server
2、需要一个client
我用 yum 安装了:
[root@localhost ~]# yum install mysql-server
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* updates: mirror.be10.com
* addons: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.i386 0:5.0.45-7.el5 set to be updated
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: perl-DBI for package: mysql-server
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Processing Dependency: perl(DBI) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Processing Dependency: mysql = 5.0.45-7.el5 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Running transaction check
---> Package perl-DBD-MySQL.i386 0:3.0007-1.fc6 set to be updated
---> Package perl-DBI.i386 0:1.52-1.fc6 set to be updated
---> Package mysql.i386 0:5.0.45-7.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-server i386 5.0.45-7.el5 base 9.7 M
Installing for dependencies:
mysql i386 5.0.45-7.el5 base 4.1 M
perl-DBD-MySQL i386 3.0007-1.fc6 base 147 k
perl-DBI i386 1.52-1.fc6 base 605 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): mysql-5.0.45-7.el5 100% |=========================| 4.1 MB 00:41
(2/4): mysql-server-5.0.4 100% |=========================| 9.7 MB 01:34
(3/4): perl-DBI-1.52-1.fc 100% |=========================| 605 kB 00:05
(4/4): perl-DBD-MySQL-3.0 100% |=========================| 147 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-DBI ######################### [1/4]
Installing: mysql ######################### [2/4]
Installing: perl-DBD-MySQL ######################### [3/4]
Installing: mysql-server ######################### [4/4]
Installed: mysql-server.i386 0:5.0.45-7.el5
Dependency Installed: mysql.i386 0:5.0.45-7.el5 perl-DBD-MySQL.i386 0:3.0007-1.fc6 perl-DBI.i386 0:1.52-1.fc6
Complete!
[root@localhost ~]# mysql
[root@localhost ~]# mysqla [tab]
mysqlaccess mysqladmin
[root@localhost ~]#
有 mysqladmin 这命令了,这样就算安装好了吗?
yum install mysql-server 只装了服务端, which mysql 一下。
如果没有,建议用 yum groupinstall mysql
[user@localhost ~]$ which mysql
/usr/bin/mysql
有了,应该安装好了,我都进去新建数据库、表了
问题基本上解决了,现在开始学mysql了。