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:
|
<<: Summary of Vue component basics
>>: How to Dockerize a Python Django Application
Table of contents topic analyze Basic solution Ba...
1. Cancel the dotted box when the button is press...
Conversion between rgba and filter values under...
This article mainly introduces the breadcrumb fun...
Table of contents 1. Overview 2. Digital Enumerat...
Introduction to Nginx Nginx is a high-performance...
Sometimes you need to access some static resource...
need Whether it is a Windows system or a Linux sy...
Table of contents 1. Vue2 syntax 2. Use of Vue3 1...
Part 1 Overview of SSH Port Forwarding When you a...
Docker view process, memory, cup consumption Star...
This article shares the specific code of js+canva...
Jupyter notebook is configured under the docker c...
Preface Creating shortcuts in Linux can open appl...
Table of contents 1. Virtual Host 1.1 Virtual Hos...