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

About scroll bar in HTML/removing scroll bar

1. The color of the scroll bar under xhtml In the ...

Example analysis of interval calculation of mysql date and time

This article uses an example to describe the inte...

Summary of principles for writing HTML pages for emails

Since HTML email is not an independent HOST page o...

Explore VMware ESXI CLI common commands

Table of contents 【Common commands】 [Summary of c...

Vue 2.0 Basics in Detail

Table of contents 1. Features 2. Examples 3. Opti...

Calling the search engine in the page takes Baidu as an example

Today, it suddenly occurred to me that it would be...

Detailed tutorial on installing mysql under Linux

1. Shut down the mysql service # service mysqld s...

A brief introduction to MySQL database optimization techniques

A mature database architecture is not designed wi...

How to set MySQL foreign keys for beginners

Table of contents The role of foreign keys mysql ...

MySQL data insertion optimization method concurrent_insert

When a thread executes a DELAYED statement for a ...

Using System.Drawing.Common in Linux/Docker

Preface After the project is migrated to .net cor...

javascript to switch pictures by clicking a button

This article example shares the specific code of ...

js implements clock component based on canvas

Canvas has always been an indispensable tag eleme...