欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

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

Linux系統(tǒng)版本:CentOS7.4

我們提供的服務(wù)有:成都網(wǎng)站設(shè)計、成都網(wǎng)站建設(shè)、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認證、六合ssl等。為上千企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學管理、有技術(shù)的六合網(wǎng)站制作公司

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

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

具體安裝步驟如下:

(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用戶登錄系統(tǒng),增加mysql用戶和組,數(shù)據(jù)庫安裝在此用戶下:

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

(3)準備數(shù)據(jù)目錄

以/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基礎(chǔ)目錄 --datadir mysql數(shù)據(jù)存放目錄,并創(chuàng)建了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

命令后面不加參數(shù)報錯,加了--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)配置環(huán)境變量:

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

(10)設(shè)置開機啟動:

[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>

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。

分享題目:CentOS7.4下MySQL5.7.28二進制方式安裝的方法步驟
瀏覽路徑:http://aaarwkj.com/article42/gpjehc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開發(fā)微信小程序、自適應網(wǎng)站標簽優(yōu)化、營銷型網(wǎng)站建設(shè)建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應式網(wǎng)站建設(shè)
一区二区三区人妻系列| 狠狠综合久久av一区二区大宝| 色中文字幕人妻诱惑制服| 麻豆久久av免费观看| 国产99久久精品免费看| 欧美艳星一区二区三区四区| 日本97久久久久久精品| 香蕉夜夜草草久久亚洲香蕉| 欧美一区二区三区中文字幕| 国产传媒视频网站在线观看| 国产女人和拘做受视频| 素人人妻一区二区三区| 国产国产成人精品久久| 精品人妻一区二区三区乱码| 国产亚洲精品一区久久| 大龄熟妇丰满有水多毛浓| 粉嫩极品国产在线观看| 日本高清有码视频在线观看| 人人妻夜夜天天俺去添噜| 91青青草原免费观看| 久久成人激情免费视频| 粉嫩国产av一区二区三区| 欧美黄片不用下载在线观看| 日本在线一区二区视频麻豆| 亚洲乱码一区二区av| 亚洲精品有码在线观看| 日本高清中文精品在线不卡| 精品国产欧美亚洲91| 92午夜福利精品视频| 神马免费午夜福利剧场| 日本精品1区国产精品| 麻豆精品新av中文字幕| 亚洲欧美韩国日本成人综合| 热久久这里只有精品网址| 成人中文字幕av电影| 九九热超在线视频精品| 欧美日韩精品视频专区| 97人妻人人澡人人添人人爽| 凹凸69堂国产成人精品| 日韩精品人妻一区二区三区蜜桃臀| 激情毛片av在线免费看|