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
1. The color of the scroll bar under xhtml In the ...
This article uses an example to describe the inte...
Since HTML email is not an independent HOST page o...
Table of contents 【Common commands】 [Summary of c...
Table of contents 1. Features 2. Examples 3. Opti...
Today, it suddenly occurred to me that it would be...
To achieve the association of the frame window, th...
1. Shut down the mysql service # service mysqld s...
A mature database architecture is not designed wi...
Table of contents The role of foreign keys mysql ...
When a thread executes a DELAYED statement for a ...
Preface After the project is migrated to .net cor...
This article shares the download and installation...
This article example shares the specific code of ...
Canvas has always been an indispensable tag eleme...