日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

CentOS6.5下通过yum仓库安装mysql

發(fā)布時(shí)間:2025/4/16 数据库 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CentOS6.5下通过yum仓库安装mysql 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

環(huán)境:Centos6.5

查看centos版本:

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

1.查看是否安裝了mysql

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

顯示沒有安裝。

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)沒有密碼。

以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è)置開機(jī)啟動(dòng)項(xiàng)

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

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

轉(zhuǎn)載于:https://blog.51cto.com/tommyking/1934216

《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀

總結(jié)

以上是生活随笔為你收集整理的CentOS6.5下通过yum仓库安装mysql的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。