fedora13 安裝 mysql

來源:互聯網
上載者:User

直接安裝下載的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>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.