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

Javascript common higher-order functions details

Table of contents 1. Common higher-order function...

Detailed explanation of the principle of creating tomcat in Eclipse

When creating a tomcat server on a local eclipse,...

Sharing tips on using Frameset to center the widescreen

Copy code The code is as follows: <frameset co...

Let's talk about the Vue life cycle in detail

Table of contents Preface 1. Life cycle in Vue2 I...

Summary of horizontal scrolling website design

Horizontal scrolling isn’t appropriate in all situ...

Common symbols in Unicode

Unicode is a character encoding scheme developed ...

Summary of MySQL composite indexes

Table of contents 1. Background 2. Understanding ...

js to realize the production method of carousel

This article shares the specific code for js to r...

Detailed explanation of the use of filter properties in CSS

The filter attribute defines the visual effect of...

IDEA uses the Docker plug-in (novice tutorial)

Table of contents illustrate 1. Enable Docker rem...

A brief discussion on the whole process of Vue's first rendering

Table of contents 1. Vue initialization vue entry...

CSS float (float, clear) popular explanation and experience sharing

I came into contact with CSS a long time ago, but...

The latest Linux installation process of tomcat8

Download https://tomcat.apache.org/download-80.cg...