Detailed explanation of the installation and configuration process of mysql8.018 on linux

Detailed explanation of the installation and configuration process of mysql8.018 on linux

Installation introduction under Windows: Check out –》Installation introduction of MySQL 8.018 under Windows

Linux Platform :

The following operations take MySQL 8.0.18 and the system is Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-142-generic x86_64) as an example:

A. Automatic installation

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev

B. Download the installation package yourself and install it using the deb file

1. Download

  • You can download the Linux version from the official website. MySQL is divided into Enterprise edition and Community edition. The community edition is free for download. Ordinary users can use the community edition, and enterprise users can use the enterprise edition.
  • Community Edition download address, https://dev.mysql.com/downloads/
  • Select MySQL Community Server


insert image description here

Enter the download interface. If you need a historical version of MySQL, click Looking for previous GA versions on the right and select the desired MySQL version; No

Select the operating system and operating system version on the current page, and then click Download.

This article takes the 64-bit system under Ubuntu 16.04 as an example.

insert image description here

No need to register or log in, just skip it.


insert image description here

  • After the download is complete, transfer the downloaded file mysql-server_8.0.18-1ubuntu16.04_amd64.deb-bundle.tar to the server.
  • Of course, you can also download it directly through wget in Ubuntu. Copy the download link and execute, wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-server_8.0.18-1ubuntu16.04_amd64.deb-bundle.tar

2. Installation

After the server is ready to install the files, first install several dependency packages required for MySQL installation.

sudo apt-get install libaio1
sudo apt-get install libmecab2
sudo apt-get install libjson-perl
sudo apt-get install libnuma1

Create a temporary directory, copy the downloaded tar file to the installation path, and unzip it to the path tar -xvf mysql-server_8.0.18-1ubuntu16.04_amd64.deb-bundle.tar

insert image description here

Start the installation (follow the order below, some debs have dependencies), and the remaining debs not listed can be ignored if not needed.

sudo dpkg -i mysql-common_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i libmysqlclient21_8.0.18-1ubuntu16.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i mysql-community-client-core_8.0.18-1ubuntu16.04_amd64.deb
sudo dpkg -i mysql-community-client_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i mysql-client_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i mysql-community-server-core_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i mysql-community-server_8.0.18-1ubuntu16.04_amd64.deb 
sudo dpkg -i mysql-server_8.0.18-1ubuntu16.04_amd64.deb

Note: When installing mysql-community-server_8.0.18-1ubuntu16.04_amd64.deb, the following input box will pop up, prompting you to enter the root account password.


insert image description here

After entering the password, the current version of MySQL will prompt you to select the encryption method related to MySQL authorization. It is recommended to select Use Strong Password Encryption for Authentication. Using enhanced SHA256-based authorization encryption can better protect account security.


insert image description here 3.

Install

Login verification. Enter the command mysql -u root -p and then enter the password.


insert image description here

4. Common instructions and parameters

  • Start: sudo service mysql start
  • Shutdown: sudo service mysql stop
  • The mysql configuration storage path is /etc/mysql . You can configure and modify the default port, data storage path, log path, default encoding format, etc.

The following is the default configuration file


insert image description here

Summarize

The above is a detailed explanation of the installation and configuration process of MySQL 8.018 on Linux. 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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Tutorial diagram of installing mysql8.0.18 under linux (Centos7)
  • Detailed tutorial on how to install mysql8.0 using Linux yum command
  • How to uninstall MySQL 8.0 version under Linux

<<:  How to use nginx to block a specified interface (URL)

>>:  Ajax responseText parses json data case study

Recommend

Related commands to completely uninstall nginx under ubuntu16.04

nginx Overview nginx is a free, open source, high...

Detailed explanation of node.js installation and HbuilderX configuration

npm installation tutorial: 1. Download the Node.j...

How to connect XShell and network configuration in CentOS7

1. Linux network configuration Before configuring...

MySQL view principles and basic operation examples

This article uses examples to illustrate the prin...

Detailed explanation of the use of Vue.js render function

Vue recommends using templates to create your HTM...

The role of nextTick in Vue and several simple usage scenarios

Purpose Understand the role of nextTick and sever...

How to use JS to implement waterfall layout of web pages

Table of contents Preface: What is waterfall layo...

In-depth study of JavaScript array deduplication problem

Table of contents Preface 👀 Start researching 🐱‍🏍...

Detailed explanation of browser negotiation cache process based on nginx

This article mainly introduces the detailed proce...

Two ways to make IE6 display PNG-24 format images normally

Method 1: Please add the following code after <...

JS implements a detailed plan for the smooth version of the progress bar

The progress bar is not smooth I believe that mos...

Detailed explanation of the command mode in Javascript practice

Table of contents definition structure Examples C...

Summary of Operator Operations That Are Very Error-Prone in JavaScript

Table of contents Arithmetic operators Abnormal s...

How to quickly set the file path alias in react

React is a JavaScript library for building user i...

A brief introduction to MySQL storage engine

1. MySql Architecture Before introducing the stor...