服務(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í)間較長(zhǎng)
(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ù)
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關(guān)文章:
1. ORA-06512數(shù)字或值錯(cuò)誤字符串緩沖區(qū)太小異常詳解2. Window7安裝MariaDB數(shù)據(jù)庫(kù)及系統(tǒng)初始化操作分析3. MySQL不使用order by實(shí)現(xiàn)排名的三種思路總結(jié)4. Spark臨時(shí)表tempView的注冊(cè)/使用/注銷/注意事項(xiàng)(推薦)5. MySQL之高可用集群部署及故障切換實(shí)現(xiàn)6. Mybatis Plus 自定義方法實(shí)現(xiàn)分頁功能的示例代碼7. MyBatis 實(shí)現(xiàn)批量插入和刪除中雙層循環(huán)的寫法案例8. 分享Sql Server 存儲(chǔ)過程使用方法9. SQL Server ISNULL 不生效原因及解決10. MySQL中庫(kù)的基本操作指南(推薦!)
