服務(wù)器Centos部署MySql并連接Navicat過程詳解
(1)服務(wù)器配置:
[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 """ 將這兩個(gè)個(gè)rpm包,以FTP形式導(dǎo)入:/var/cache/yum/x86_64/7/mysql57-community/packages/ [root@localhost src]# yum -y install mysql-server
等待時(shí)間較長
(2)重置密碼與創(chuàng)建用戶
#重啟mysql服務(wù) [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當(dāng)前用戶:
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)實(shí)現(xiàn)在Navicat上連接
【常規(guī)】端配置參數(shù)
【SSH】端配置參數(shù)
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持本站。
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。