主頁 > 知識庫 > 服務器Centos部署MySql并連接Navicat過程詳解

服務器Centos部署MySql并連接Navicat過程詳解

熱門標簽:硅谷的囚徒呼叫中心 百度競價點擊價格的計算公式 阿里云 智能手機 使用U盤裝系統(tǒng) 檢查注冊表項 美圖手機 網(wǎng)站建設(shè)

(1)服務器配置:

[root@localhost ~]# cd /usr/local/src/

[root@localhost src]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm 

[root@localhost src]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm 

"""
mysql-community-client-5.7.30-1.el7.x86_64.rpm   
mysql-community-server-5.7.31-1.el7.x86_64.rpm
"""
將這兩個個rpm包,以FTP形式導入:/var/cache/yum/x86_64/7/mysql57-community/packages/

[root@localhost src]# yum -y install mysql-server

等待時間較長

(2)重置密碼與創(chuàng)建用戶

#重啟mysql服務
[root@VM-0-3-centos src]# service mysqld restart

#重置密碼
[root@localhost ~]# grep "password" /var/log/mysqld.log

#密碼重置mysql> alter user 'root'@'localhost' identified by 'password';//密碼重置,新的密碼
Query OK, 0 rows affected (0.00 sec)

#創(chuàng)建新的用戶,
mysql> create user 'username'@'%' identified by 'paswword';//添加新的用戶,密碼
Query OK, 0 rows affected (0.00 sec)#給新用戶分權(quán)限mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
  Query OK, 0 rows affected (0.00 sec)
   #刷新權(quán)限  
   mysql> flush privileges;
   Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

#刷新權(quán)限

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

(3)查詢MySql當前用戶:

mysql> select user,host from mysql.user;
+---------------+-----------+
| user     | host   |
+---------------+-----------+
| user1     | %     |
| mysql.session | localhost |
| mysql.sys   | localhost |
| root     | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)

mysql>

(4)實現(xiàn)在Navicat上連接

【常規(guī)】端配置參數(shù)

【SSH】端配置參數(shù)

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:山南 黃山 賀州 懷化 湖北 煙臺 通遼 湘潭

巨人網(wǎng)絡通訊聲明:本文標題《服務器Centos部署MySql并連接Navicat過程詳解》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266