Centos7.5 installs mysql5.7.24 binary package deployment

Centos7.5 installs mysql5.7.24 binary package deployment

1. Environmental preparation:

Operating system: CentOS Linux release 7.5.1804 (Core)

mysql version: mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz

IP: 172.16.8.247

2. MySQL 5.7 binary installation

1. Install dependency packages

yum -y install libaio

2. Install MySQL software

Download the package:

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. Initialize data

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. Modify the configuration file

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 starts the MYSQL service

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. Start the service

systemctl restart mysqld
systemctl enable mysqld

7. Change mysql root password

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

Summarize

The above is the introduction of the Centos7.5 installation of mysql5.7.24 binary package deployment. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • MySQL 5.7.18 binary package installation tutorial under Linux (without default configuration file my_default.cnf)
  • Deploy MySQL 5.7.17 binary installation and multi-instance configuration on CentOS 6.5
  • Detailed tutorial on customizing the installation path of MySQL 5.7.18 version (binary package installation)
  • How to install mysql5.7.24 binary version on Centos 7 and how to solve it
  • Detailed tutorial on installing MySQL 5.7.11 for Linux Generic binary version in CentOS 7 via command line
  • Tutorial on installing MySQL 5.6.20 using Linux binary universal package
  • Install mysql5.6 in ubuntu system (through binary)
  • mysql 5.7.19 latest binary installation
  • MySQL 5.6.24 (binary) automatic installation script under Linux
  • The whole process record of MySQL binary installation and backup

<<:  Several ways to encapsulate axios in Vue

>>:  Use of js optional chaining operator

Recommend

About converting textarea text to html, that is, carriage return and line break

Description: Change the carriage return in the tex...

Getting Started Tutorial for Beginnersâ‘§: Easily Create an Article Site

In my last post I talked about how to make a web p...

Vue implements tree table through element tree control

Table of contents Implementation effect diagram I...

Sample code on how to implement page caching in vue mobile project

background On mobile devices, caching between pag...

How to use ElementUI pagination component Pagination in Vue

The use of ElementUI paging component Pagination ...

A complete guide to CSS style attributes css() and width() in jQuery

Table of contents 1. Basic use of css(): 1.1 Get ...

MySQL character set garbled characters and solutions

Preface A character set is a set of symbols and e...

Installation process of CentOS8 Linux 8.0.1905 (illustration)

As of now, the latest version of CentOS is CentOS...

Summary of three ways to implement ranking in MySQL without using order by

Assuming business: View the salary information of...

MySQL learning database operation DML detailed explanation for beginners

Table of contents 1. Insert statement 1.1 Insert ...

Theory: The two years of user experience

<br />It has been no more than two years sin...

Install mysql 5.6 from yum source in centos7.4 system

System environment: centos7.4 1. Check whether th...

Dynamically add tables in HTML_PowerNode Java Academy

Without further ado, I will post the code for you...