主頁(yè) > 知識(shí)庫(kù) > Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署

Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署

熱門標(biāo)簽:如何在高德地圖標(biāo)注新地址 400電話辦理都選易號(hào)網(wǎng) 高德地圖標(biāo)注中心個(gè)人注冊(cè) 外呼系統(tǒng)防封號(hào)違法嗎 外呼系統(tǒng)服務(wù) 高德地圖標(biāo)注模式 湘潭電銷機(jī)器人咨詢電話 寶應(yīng)電信400電話辦理費(fèi)用 電銷機(jī)器人針對(duì)的

一、環(huán)境準(zhǔn)備:

操作系統(tǒng):CentOS Linux release 7.5.1804 (Core)

mysql版本:mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz

IP:172.16.8.247

二、mysql5.7二進(jìn)制安裝

1、安裝依賴包

yum -y install libaio

2、安裝mysql軟件

下載軟件包:

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

tar -xvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz -C ../
cd ..
mv mysql-5.7.24-linux-glibc2.12-x86_64/ mysql5.7
useradd -s /sbin/nologin -M mysql
mkdir -p /app/mysql5.7/{etc,logs,tmp}

3、初始化數(shù)據(jù)

bin/mysqld --initialize --basedir=/app/mysql5.7/ --datadir=/app/mysql5.7/data --user=mysql

# bin/mysqld --initialize --basedir=/app/mysql5.7/ --datadir=/app/mysql5.7/data --user=mysql
2018-11-25T03:03:16.299117Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-25T03:03:16.946059Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-11-25T03:03:17.033699Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-11-25T03:03:17.089657Z 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: a7fef663-f05e-11e8-b1f5-08002728f0e4.
2018-11-25T03:03:17.090377Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-11-25T03:03:17.090784Z 1 [Note] A temporary password is generated for root@localhost: m:fw/7on%>Bh

4、修改配置文件

chown -R mysql .
vim /app/mysql5.7/etc/my.cnf
[mysqld]
daemonize = on
user = mysql
port = 3306
basedir = /app/mysql5.7
datadir = /app/mysql5.7/data
socket = /tmp/mysql.sock
bind-address = 0.0.0.0
pid-file = /app/mysql5.7/tmp/mysqld.pid
character-set-server = utf8
collation-server = utf8_general_ci
max_connections = 2408
log-error = /app/mysql5.7/logs/mysqld.log

5、systemd啟動(dòng)MYSQL服務(wù)

vim /lib/systemd/system/mysqld.service
[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
User=mysql
Group=mysql
Type=forking
TimeoutSec=0
PermissionsStartOnly=true
ExecStart=/app/mysql5.7/bin/mysqld --defaults-file=/app/mysql5.7/etc/my.cnf
LimitNOFILE = 5000
Restart=on-failure
RestartPreventExitStartus=1
PrivateTmp=false

6、啟動(dòng)服務(wù)

systemctl restart mysqld
systemctl enable mysqld

7、修改mysql root密碼

vim /etc/profile
export PATH=$PATH:/app/mysql5.7/bin
source /etc/profile
mysql -uroot -p
alter user 'root'@'localhost' IDENTIFIED BY 'Devops@2018';

總結(jié)

以上所述是小編給大家介紹的Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

您可能感興趣的文章:
  • CentOS7.5 安裝 Mysql8.0.19的教程圖文詳解
  • CentOS7.5使用mysql_multi方式安裝MySQL5.7.28多實(shí)例(詳解)
  • CentOS7.5 安裝MySql的教程

標(biāo)簽:黃山 佛山 南充 宿遷 黔南 蘭州 馬鞍山 賀州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署》,本文關(guān)鍵詞  Centos7.5,安裝,mysql5.7.24,二進(jìn)制,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于Centos7.5安裝mysql5.7.24二進(jìn)制包方式部署的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章