CentOS6.5下通過(guò)yum倉(cāng)庫(kù)安裝mysql

環(huán)境:Centos6.5

創(chuàng)新互聯(lián)專(zhuān)業(yè)為企業(yè)提供堯都網(wǎng)站建設(shè)、堯都做網(wǎng)站、堯都網(wǎng)站設(shè)計(jì)、堯都網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、堯都企業(yè)網(wǎng)站模板建站服務(wù),十余年堯都做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

查看centos版本:

[root@localhost ~]# cat /etc/redhat-release 
CentOS release 6.5 (Final)

1.查看是否安裝了MySQL

[root@localhost ~]# rpm -qa | grep 'mysql'
[root@localhost ~]#

顯示沒(méi)有安裝。

2.安裝mysql客戶端

[root@localhost ~]# yum -y install mysql
[root@localhost ~]#

3.安裝mysql服務(wù)端

[root@localhost ~]# yum -y install mysql-server mysql-devel
[root@localhost ~]#

4.安裝mysql客戶端和服務(wù)端

[root@localhost ~]# yum -y install mysql mysql-server mysql-devel
[root@localhost ~]#

5.查詢mysql是否已安裝完成

以安裝mysql客戶端和服務(wù)端為例:

[root@localhost ~]# rpm -qa | grep 'mysql'
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-devel-5.1.73-8.el6_8.x86_64
mysql-5.1.73-8.el6_8.x86_64
mysql-server-5.1.73-8.el6_8.x86_64
[root@localhost ~]#

6.啟動(dòng)mysql

[root@localhost ~]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost ~]#

或使用下面命令:

[root@localhost ~]# /etc/init.d/mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost ~]#

7.查看mysql狀態(tài)

[root@localhost ~]# service mysqld status
mysqld (pid  3043) is running...
[root@localhost ~]#

8.進(jìn)入mysql

進(jìn)入mysql---注:mysql安裝后的root默認(rèn)沒(méi)有密碼。

以root用戶名進(jìn)入mysql:

[root@localhost ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>

9.將mysql設(shè)置開(kāi)機(jī)啟動(dòng)項(xiàng)

[root@localhost ~]#chkconfig mysqld on
[root@localhost ~]#

好了,此時(shí)安裝mysql完成了。

文章標(biāo)題:CentOS6.5下通過(guò)yum倉(cāng)庫(kù)安裝mysql
文章分享:http://muchs.cn/article42/pphhhc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、做網(wǎng)站定制網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、微信公眾號(hào)虛擬主機(jī)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)