標籤:最新版 遠程伺服器 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安裝和遠端存取步驟