【MySQL】配置MySQL安裝和遠端存取步驟

來源:互聯網
上載者:User

標籤:最新版   遠程伺服器   art   set   最新   list   cat   多少   community   

以遠程伺服器為例,安裝Mysql到Linux並配置遠端存取,步驟如下:1.下載安裝最新的rpm檔案方法一:
rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

方法二:

(最新版地址:http://mirrors.sohu.com/mysql/ ) 2.安裝MySQL,輸入命令:
yum install mysql-community-server
3.安裝完之後查看版本號碼
mysql -V
4.啟動MySQL,輸入命令:
service mysqld start
5.配置mysql開機自動啟動
chkconfig mysqld on
6.查看配置狀況
chkconfig --list | grep mysql
7.為管理員設定密碼
mysqladmin -u root password
  --------配置遠端存取---------8.進入資料庫
mysql -u root -p
9.查看有多少資料庫
show databases;
10.進入mysql資料庫
use mysql;
11.查詢user表裡面的欄位
select host,user,password from user;
12.然後找到localhost root 和帶password的一條,並將localhost改成‘%‘(註:這裡是為root帳號開啟訪問IP的許可權,最好建立一個Mysql使用者再開啟,不要用root)
update user set host=‘%‘ where password=‘*0049957DDE5C3C58AED‘;
13.重啟mysql服務
service mysqld restart
14.本地安裝:NavicatPremium,開啟NavicatPremium建立一個串連,a.選擇常規,輸入資料庫連接資訊b.選擇SSH,然後輸入伺服器的資訊進行串連

 

 

【MySQL】配置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.