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

js to achieve the effect of dragging the slider

This article shares the specific code of how to d...

Sharing tips on using scroll bars in HTML

Today, when we were learning about the Niu Nan new...

Vue implements the magnifying glass function of the product details page

This article shares the specific code of Vue to i...

Solution to Ubuntu not being able to connect to the Internet

Problem description: I used a desktop computer an...

Linux's fastest text search tool ripgrep (the best alternative to grep)

Preface Speaking of text search tools, everyone m...

Practical notes on installing Jenkins with docker-compose

Create a Directory cd /usr/local/docker/ mkdir je...

One minute to experience the smoothness of html+vue+element-ui

Technology Fan html web page, you must know vue f...

React implements import and export of Excel files

Table of contents Presentation Layer Business Lay...

How to implement Docker volume mounting

The creation of the simplest hello world output i...

JS+Canvas realizes dynamic clock effect

A dynamic clock demo based on Canvas is provided ...

How to set static IP in centOS7 NET mode

Preface NAT forwarding: Simply put, NAT is the us...

Solve the problem of margin merging

1. Merge the margins of sibling elements The effe...

Solution to the problem of repeated triggering of functions in Vue project watch

Table of contents Problem description: Solution 1...

How to query or obtain images in a private registry

Docker queries or obtains images in a private reg...