好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟

CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟

熱門標簽:蘭州ai電銷機器人招商 江西外呼系統 AI電銷機器人 源碼 高德地圖標注論壇 新邵電銷機器人企業 湖北ai智能電銷機器人 新科美甲店地圖標注 北海市地圖標注app 外呼系統打哪顯哪

Linux系統版本:CentOS7.4

MySQL版本:5.7.28

在Linux平臺有RPM包、二進制包、源碼包3中安裝方式,這一篇文章主要是以RPM包為例來介紹如何在Linux平臺下進行MySQL的安裝。

下載地址:

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz


具體安裝步驟如下:

(1)首先卸載mariadb,不然后面會和安裝mysql需要的庫沖突:

[root@localhost ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.56-2.el7.x86_64
[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64

(2)用root用戶登錄系統,增加mysql用戶和組,數據庫安裝在此用戶下:

[root@localhost ~]# groupadd mysql
[root@localhost ~]# useradd -r -g mysql -s /bin/false mysql

(3)準備數據目錄

以/app/data為例,建議使用邏輯卷

[root@localhost ~]# mkdir -p /app/data
[root@localhost ~]# chown mysql.mysql /app/data/
[root@localhost ~]# chmod 750 /app/data

(4)準備二進制文件:

[root@localhost ~]# tar xvf mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
root@localhost ~]# cd /usr/local
[root@localhost local]# ln -sv mysql-5.7.28-linux-glibc2.12-x86_64 mysql
‘mysql' -> ‘mysql-5.7.28-linux-glibc2.12-x86_64'

(5)初始化MySQL:

[root@localhost ~]# cd /usr/local/mysql
[root@localhost mysql]# bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/app/data
2019-11-03T09:47:18.263716Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-11-03T09:47:19.059462Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-11-03T09:47:19.140866Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-11-03T09:47:19.207569Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ed1cd8ec-fe1e-11e9-8c9c-000c29f8617a.
2019-11-03T09:47:19.209181Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-11-03T09:47:19.646366Z 0 [Warning] CA certificate ca.pem is self signed.
2019-11-03T09:47:20.056792Z 1 [Note] A temporary password is generated for root@localhost: rY-6f??#!<zO

其中--basedir mysql基礎目錄 --datadir mysql數據存放目錄,并創建了root用戶的臨時密碼:rY-6f??#!<zO

(6)開啟ssl連接:

[root@localhost mysql]# bin/mysql_ssl_rsa_setup
2019-11-03 23:09:55 [ERROR]  Failed to access directory pointed by --datadir. Please make sure that directory exists and is accessible by mysql_ssl_rsa_setup. Supplied value : /usr/local/mysql/data
[root@localhost mysql]# bin/mysql_ssl_rsa_setup --datadir=/app/data

命令后面不加參數報錯,加了--datadir后不報錯

(7)編輯配置文件,保存退出:

[root@localhost mysql]# vim /etc/my.cnf
[mysqld]
# GENERAL
datadir=/app/data
socket=/app/data/mysql.sock
user=mysql
default-storage-engine=InnoDB

[mysqld_safe]
log-error=/app/data/mysql-error.log
pid-file=/app/data/mysqld.pid

[client]
socket=/app/data/mysql.sock

(8)啟動MySQL:

[root@localhost mysql]# bin/mysqld_safe --user=mysql &

(9)配置環境變量:

[root@localhost ~]# vim /etc/profile
#添加下面一行
export PATH=$PATH:/usr/local/mysql/bin
[root@localhost ~]# source /etc/profile

(10)設置開機啟動:

[root@localhost mysql]# cp support-files/mysql.server /etc/init.d/mysql.server
[root@localhost mysql]# chkconfig --add mysql.server

(11)測試登錄成功:

[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.28

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

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

標簽:大理 自貢 黔東 阿克蘇 海南 池州 南陽 黃石

巨人網絡通訊聲明:本文標題《CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟》,本文關鍵詞  CentOS7.4,下,MySQL5.7.28,二進制,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟》相關的同類信息!
  • 本頁收集關于CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 17c国产精品一区二区| 国产免费叼嘿在线观看| 国内露脸少妇精品| 色免费在线观看| Free性XXXXⅩonHD| bdsm残忍暴力虐乳bdsm网站| 欧美粗大猛烈20p| 999精品在线| 把jiji?进美女的屁屁里视频| 激情床戏视频办公室大尺度| PROXXON是国产| 用舌头去添女人下边视频| 真人啪啪XXOO动态图96式 | 一级毛片韩国| 欧美激情福利视频在线观看| 香蕉97人妻免费碰碰碰| 欧美妇人实战BBwBBw| 91在线国偷自产国产永久| 精品亚洲爆乳AV在线播放| 舌奴伺候主人晨尿男男| 鉴黄师APP安装| 美女露出逼| 欧美老妇b| 一女多夫的共妻文h高辣| 男男下药顶撞喘嗯啊H漫画| 无套内谢少妇毛片A片樱花 | 久久久亚洲熟妇熟女ⅩXXX片| 国产精品久久久久久精品无码红石| 护士囗交10p| 国产日韩欧美精品一区二区三区| 秋霞鲁丝一区二区三区精品观看| 爽?躁多水?快?深点校园| 女人特黄大aaaaaa大片| zljzljzlj亚洲乱熟无码| 亚洲春色AV无码专区456| 男主和女配啪慎入h| 好硬好湿好爽在深一点动态图| 日韩欧美国产高清在线观看| 亚洲国产网站| 色欲狠狠躁天天躁无码中文字幕| 亚洲色欲va国产日韩欧美精品|