Linux系統 Centos7/Centos6.8 yum命令線上安裝 MySQL5.6

來源:互聯網
上載者:User

標籤:har   開發   std   target   dev   tle   class   賬戶   for   

Linux系統 Centos7 yum命令線上安裝 MySQL5.6標籤: centosmysqlyum2015-11-18 17:21 707人閱讀 評論(0) 收藏 舉報 分類:Linux

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

現在Centos7的yum源中 沒有mysql,可以直接安裝。用了MariaDB 代替了。 那我們如果要裝MySQL資料庫,可以用以下方法 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm# rpm -ivh mysql-community-release-el7-5.noarch.rpm# yum install mysql-community-server 

成功安裝之後重啟MySQL服務

#systemctl start mysqld.service

 

初次安裝mysql是root賬戶是沒有密碼的

設定密碼:

#mysql -urootmysql> set password for ‘root’@‘localhost’ = password(‘mypasswd‘);
mysql> exitPS: 如果你是個人電腦上 開發學慣用,可以不設密碼無密碼登入: mysql -uroot有密碼登入: mysql -uroot -p你的密碼 安裝成功後,幾個重要的目錄:資料庫目錄
/var/lib/mysql/
設定檔
/usr/share/mysql(mysql.server命令及設定檔)
相關命令
/usr/bin(mysqladmin mysqldump等命令)
啟動指令碼
/etc/rc.d/init.d/(啟動指令檔mysql的目錄)

Linux系統 Centos7/Centos6.8 yum命令線上安裝 MySQL5.6

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.