Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure mysql8.0 in centos7 system

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following mainly brings you how to install and configure mysql8.0 on the centos7 system. I hope these contents can bring you practical use, which is also the main purpose of this article on how to install and configure mysql8.0 on the centos7 system. All right, don't talk too much nonsense, let's just read the following.

At present, the latest version of the official website of MySQL is mysql8.0. Although there are no new elements added to the new features, it reconstructs the source code of mysql. The most prominent point is the improvement of the MySQL Optimizer optimizer, supporting hidden indexes and other functions. New features include

1. The data dictionary of transaction type is added, and all the metadata information is stored by InnoDB storage engine.

2. Adjust role management and authorization

3. Configuration persistence

4. The default character set is utf8mb4, which contains all emoji characters.

5. Hide the index

6. Support DDL atomic operation

7. Introduce histogram

8. Support session-level SET_VAR to dynamically adjust some parameters

I. Environmental preparation

Before installation, you need to prepare the environment and do some optimization work for centos7

Systemctl stip firewalldsystemctl disable firewalldsed-I's etc/sysconfig/selinux effective after rebooting the machine.

View the cpu io scheduling model. Mysql uses cpu to schedule IO to disk to get data.

Cat / sys/block/sda/queue/scheduler # sda is the first hard drive

[] is the default

Description:

1. Cfg mode is a general algorithm, which ensures that everything is as fair as possible.

This mode is a more general algorithm, which ensures that all tasks are excellent and fair.

2. On the basis of cfq, the deadline mode ensures that the service request is served within a deadline, which is shorter than the write deadline, thus preventing the write operation from starving to death because it cannot be read.

Deadline is the best choice for the IO model of database cloud servers, giving priority to read requests, and is more suitable for SA mechanical hard disks.

3) noop mode has only one queue, and whenever a new request comes in, it will merge the device file with the most recent request.

This mode gives priority to write and starve read operation. Contrary to deadline, this mode is not applicable. If you use solid state disk, you can try it.

It is recommended that it be in deadline mode and be modified as follows

Grubby-update-kernel=ALL-args= "elevator=deadile"

Swap use: swap is a protection mechanism for operating system memory, which is the mapping of files to memory on disk. When memory is insufficient or memory tasks are not active, the operating system schedules these tasks to swap to prevent the system from being overloaded. Excessive use of swap will degrade the performance of the database, because it is not memory itself, so you need to take an equilibrium value, that is, to ensure the use of swap, but try not to use it. If the performance of the CVM is good, you can directly set it to swap 0.

Cat / proc/sys/vm/swappiness # View current allocation ratio

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report