search
HomeDatabaseMysql TutorialSharing the steps to install MySQL on Linux (binary distribution version) (pictures and text)

This article mainly introduces the Linux installation MySQL tutorial in detail, the binary distribution version, which has certain reference value. Interested friends can refer to this tutorial

The detailed steps for installing MySQL on Linux are shared with you for your reference. The specific content is as follows

Step one:

Download the MySQL installation package

Enter 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 should be OK to choose the Red Hat system, because CentOS is almost the same as Red Hat)

You can download it locally in the windows environment, Then copy it to the linux directory, and here I use the following command to download directly under linux

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

After the download is completed, it will display 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
正在解析主机 cdn.mysql.com (cdn.mysql.com)... 104.124.241.153
正在连接 cdn.mysql.com (cdn.mysql.com)|104.124.241.153|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:641555814 (612M) [application/x-tar-gz]
正在保存至: “mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz”

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

2017-02-14 10:40:07 (715 KB/s) - 已保存 “mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz” [641555814/641555814])

After downloading, download from the current folder directory and move the installation package 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

The second step:

Create user groups and users, and unzip the installation package

[root@hhh hhh]# groupadd mysql //创建Mysql用户组
[root@hhh hhh]# useradd -g mysql mysql  //创建系统用户mysql并将其加入到用户组mysql中
[root@hhh hhh]# tar xzvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz //解压压缩包

The third step:

Create a symbolic link

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

[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 to /home/markpain/mysql-5.7.16-linux-glibc2.5-x86_64 /usr/local/mysql, mysql-5.7.16-linux-glibc2. 5-x86_64 is the real 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 a different directory 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 detailed content of Sharing the steps to install MySQL on Linux (binary distribution version) (pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL BLOB : are there any limits?MySQL BLOB : are there any limits?May 08, 2025 am 12:22 AM

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

MySQL : What are the best tools to automate users creation?MySQL : What are the best tools to automate users creation?May 08, 2025 am 12:22 AM

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

MySQL: Can I search inside a blob?MySQL: Can I search inside a blob?May 08, 2025 am 12:20 AM

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQL String Data Types: A Comprehensive GuideMySQL String Data Types: A Comprehensive GuideMay 08, 2025 am 12:14 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

Mastering MySQL BLOBs: A Step-by-Step TutorialMastering MySQL BLOBs: A Step-by-Step TutorialMay 08, 2025 am 12:01 AM

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BLOB Data Type in MySQL: A Detailed Overview for DevelopersBLOB Data Type in MySQL: A Detailed Overview for DevelopersMay 07, 2025 pm 05:41 PM

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

How to Add Users to MySQL from the Command LineHow to Add Users to MySQL from the Command LineMay 07, 2025 pm 05:01 PM

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

What Are the Different String Data Types in MySQL? A Detailed OverviewWhat Are the Different String Data Types in MySQL? A Detailed OverviewMay 07, 2025 pm 03:33 PM

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.