CentOS6.5下通过yum仓库安装mysql
生活随笔
收集整理的這篇文章主要介紹了
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ù)端為例:
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)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle获取最近执行的SQL语句
- 下一篇: 秒懂Mycat和MySQL的区别【转自百