您的位置:首页 > Web前端

fedora13 安装 mysql

2011-04-15 15:49 211 查看
直接安装下载的rpm包有的时候会因为缺少mysql的依赖库而无法安装成功



可通过执行命令来实现安装操作,如下命令是安装mysql客户端,服务器和C语言开发环境:

sudo yum install mysql mysql-server mysql-devel

参考:

[root@lee1 ~]# sudo yum install mysql mysql-server mysql-devel
已加载插件:presto, refresh-packagekit
设置安装进程
包 mysql-5.1.55-1.fc13.i686 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> 软件包 mysql-devel.i686 0:5.1.55-1.fc13 将被 升级
---> 软件包 mysql-server.i686 0:5.1.55-1.fc13 将被 升级
--> 处理依赖关系 perl(DBI),它被软件包 mysql-server-5.1.55-1.fc13.i686 需要
--> 处理依赖关系 perl-DBD-MySQL,它被软件包 mysql-server-5.1.55-1.fc13.i686 需要
--> 处理依赖关系 perl-DBI,它被软件包 mysql-server-5.1.55-1.fc13.i686 需要
--> 执行事务检查
---> 软件包 perl-DBD-MySQL.i686 0:4.017-1.fc13 将被 升级
---> 软件包 perl-DBI.i686 0:1.609-4.fc13 将被 升级
--> 完成依赖关系计算

依赖关系解决

================================================================================
软件包 架构 版本 仓库 大小
================================================================================
正在安装:
mysql-devel i686 5.1.55-1.fc13 updates 128 k
mysql-server i686 5.1.55-1.fc13 updates 8.3 M
为依赖而安装:
perl-DBD-MySQL i686 4.017-1.fc13 updates 137 k
perl-DBI i686 1.609-4.fc13 fedora 707 k







在安装的过程中会下载mysql的依赖库,此时要确保机器能够连上互联网。



安装完后 重启mysql 重启命令如下:



service mysqld restart



参考:

[root@lee1 ~]# service mysqld restart
停止 mysqld: [确定]
初始化 MySQL 数据库: 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 lee1 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

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 /usr/mysql-test ; perl mysql-test-run.pl

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

[确定]
正在启动 mysqld: [确定]



重启成功后就可以直接输入mysql进入mysql的数据库了。



参考:

[root@lee1 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 2
Server version: 5.1.55 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.





mysql>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: