Linux installation MySQL tutorial (binary distribution)

Linux installation MySQL tutorial (binary distribution)

This tutorial shares the detailed steps of installing MySQL on Linux for your reference. The specific contents are as follows

first step:

Download the MySQL installation package

Go to the MySQL official website, enter the download interface, and select the version and operating platform you need. My computer is Centos 7. I choose Linux Generic as the operating system and the latest version. (I think it is OK to choose Red Hat system, because CentOS is similar to Red Hat)

You can download it locally in Windows environment and then copy it to the Linux directory. Here I use the following command to download it directly in Linux:

[root@hhh ~]# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz

When the download is complete it will look like this:

--2017-02-14 10:25:28-- https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
Resolving host cdn.mysql.com (cdn.mysql.com)... 104.124.241.153
Connecting to cdn.mysql.com (cdn.mysql.com)|104.124.241.153|:443... Connected.
HTTP request has been sent, waiting for response... 200 OK
Length: 641555814 (612M) [application/x-tar-gz]
Saving to: "mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz"

100%[=============================================>] 641,555,814 865KB/s Time taken 14m 36s

2017-02-14 10:40:07 (715 KB/s) - Saved "mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz" [641555814/641555814])

After downloading, move the installation package from the current folder to your home directory. In this way, you can see the downloaded installation package in your home directory.

[root@hhh hhh]# ls
a.out Documents mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz Templates
ctest Downloads Pictures Videos
c_test.c Hello7 Public
Desktop Music Python-3.4.3

Step 2:

Create user groups and users, and unzip the installation package

[root@hhh hhh]# groupadd mysql //Create a Mysql user group[root@hhh hhh]# useradd -g mysql mysql //Create a system user mysql and add it to the user group mysql[root@hhh hhh]# tar xzvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz //Unzip the compressed package

Step 3:

Creating a Symbolic Link

After running the decompression command, we also need to create a mysql symbolic link in the /usr/local/ path created by tar.

[root@hhh hhh]#ln -s /home/markpain/mysql-5.7.16-linux-glibc2.5-x86_64 /usr/local/mysql

The above command creates a link /usr/local/mysql to /home/markpain/mysql-5.7.16-linux-glibc2.5-x86_64, where mysql-5.7.16-linux-glibc2.5-x86_64 is the actual name of the subdirectory created by tar in the /usr/local/directory. This link is necessary because the default installation path of MySQL is /usr/local/mysql and the default data directory is /usr/local/mysql/data.

It is worth noting that some MySQL versions use different directories as the default installation directory, so it is very important to refer to the MySQL online documentation.

So far, MySQL has been basically installed.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Tutorial on installing MySQL 5.6.20 using Linux binary universal package
  • A brief discussion on some issues of installing MySQL using Linux binary packages

<<:  Summary of Vue component basics

>>:  How to Dockerize a Python Django Application

Recommend

Detailed analysis of when tomcat writes back the response datagram

The question arises This question arose when I wa...

Detailed explanation of Object.create instance usage in js

1. Create a new object using the Object.create() ...

Bootstrap3.0 study notes table related

This article mainly explains tables, which are no...

CSS to achieve the image hovering mouse folding effect

CSS to achieve the image hovering mouse folding e...

Detailed explanation of JavaScript axios installation and packaging case

1. Download the axios plugin cnpm install axios -...

JavaScript Array Detailed Summary

Table of contents 1. Array Induction 1. Split a s...

The DOCTYPE mode selection mechanism of well-known browsers

Document Scope This article covers mode switching...

Steps to split and compress CSS with webpack and import it with link

Let's take a look at the code file structure ...

Detailed explanation of JavaScript Reduce

Table of contents map filter some every findIndex...

MySql 5.6.35 winx64 installation detailed tutorial

Note: There was no error in the project startup d...

Two ways to create SSH server aliases in Linux

Preface If you frequently access many different r...

How to use Tencent slider verification code in Vue3+Vue-cli4 project

Introduction: Compared with traditional image ver...

MySQL 5.7.31 64-bit free installation version tutorial diagram

1. Download Download address: https://dev.mysql.c...