Bo main QQ:819594300
Blog address:http://zpf666.blog.51cto.com/
Have any questions friends can contact Bo Master, Bo Master will help you answer, thank you for your support!
One, download the MySQL RPM package
Mysql5.7.19 is that:
http://dev.mysql.com/downloads/mysql/
You will find MySQL support for all of the system versions as follows:
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/9D/CF/wKioL1mGw1vhzaWQAAMCPJboaww056.jpg "style=" float : none; "title=" image001.jpg "alt=" Wkiol1mgw1vhzawqaamcpjboaww056.jpg "/>
Here we choose the red Hat Enterprise linux/oracle Linux System 6 version of the 64-bit MySQL RPM package
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M00/9D/CF/wKiom1mGw1yD6-xnAAE4VZMhhA0118.jpg "style=" float : none; "title=" image002.jpg "alt=" Wkiom1mgw1yd6-xnaae4vzmhha0118.jpg "/>
Ii. Installing and configuring the RPM package for MySQL
Mysql The official recommended that we use the RPM package to install MySQL
Specific RPM package installation steps are as follows:
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M00/9D/CF/wKioL1mGw12ARY3BAAJdHVlaI3Y162.jpg "style=" float : none; "title=" image003.jpg "alt=" Wkiol1mgw12ary3baajdhvlai3y162.jpg "/>
We can see that there are a lot of packages extracted, respectively, explained as follows:
mysql-community-server-5.7.19-1.el6.x86_64.rpm : Server-side installation package
mysql-community-client-5.7.19-1.el6.x86_64.rpm : Client Installation package
mysql-community-devel-5.7.19-1.el6.x86_64.rpm : Contains the library header file installation package for development
mysql-community-test-5.7.19-1.el6.x86_64.rpm : Some of the test installation packages
mysql-community-embedded-5.7.19-1.el6.x86_64.rpm : Embedded MySQL installation package
mysql-community-libs-5.7.19-1.el6.x86_64.rpm : MySQL Shared library installation package
mysql-community-common-5.7.19-1.el6.x86_64.rpm : MySQL Configuration installation package
mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm : MySQL Compatibility library installation package
mysql-community-embedded-devel-5.7.19-1.el6.x86_64.rpm : Installation package for embedded development library
In fact, so many packages, some of us do not use, in general, we only install client and server two packages, if your company needs to carry out c/c++mysql related development, then mysql-community-devel-5.7.19-1.el6.x86_ 64.RPM This package is also installed.
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M01/9D/CF/wKiom1mGw16xTQcsAAKnVXJTo7k683.jpg "style=" float : none; "title=" image004.jpg "alt=" Wkiom1mgw16xtqcsaaknvxjto7k683.jpg "/>
You can see that we install the server and client two packages will have a dependent package, then we first install the dependency package
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M01/9D/CF/wKioL1mGw1-SS0HVAALYWvn4de8507.jpg "style=" float : none; "title=" image005.jpg "alt=" Wkiol1mgw1-ss0hvaalywvn4de8507.jpg "/>
We found that installing Mysql-community-common This package reported a lot of errors, this is because the installation of the system by default MySQL, must also install the low version of the Lib shared library, we are now installing a high version of MySQL, Incompatible with each other so to uninstall we want to install the higher version of the Lib shared library we just unzipped.
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/9D/CF/wKiom1mGw2GwB86YAAJvOezDoBc937.jpg "style=" float : none; "title=" image006.jpg "alt=" Wkiom1mgw2gwb86yaajvoezdobc937.jpg "/>
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/9D/CF/wKioL1mGw2GC2dmuAADyyNWMxNQ365.jpg "style=" float : none; "title=" image007.jpg "alt=" Wkiol1mgw2gc2dmuaadyynwmxnq365.jpg "/>
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/9D/CF/wKioL1mGw2LCUmrzAAEd5dl8Mrs706.jpg "style=" float : none; "title=" image008.jpg "alt=" Wkiol1mgw2lcumrzaaed5dl8mrs706.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/9D/CF/wKiom1mGw2PixAMUAAIhdkxh1eI912.jpg "style=" float : none; "title=" image009.jpg "alt=" Wkiom1mgw2pixamuaaihdkxh1ei912.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/9D/CF/wKioL1mGw2PCIGcqAADXPkAFw9Q151.jpg "style=" float : none; "title=" image010.jpg "alt=" Wkiol1mgw2pcigcqaadxpkafw9q151.jpg "/>
In this case, our mysql5.7.19 even if the installation is complete, next we need to modify the MySQL root user's password, the steps are as follows:
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/9D/CF/wKiom1mGw2SQNuYQAAEDX1aXbBM273.jpg "style=" float : none; "title=" image011.jpg "alt=" Wkiom1mgw2sqnuyqaaedx1axbbm273.jpg "/>
We can see that the way to change the password is not feasible, how to do?
We adopt another method of changing the password, the steps are as follows:
1 first determine if the MySQL service is a stopped state, if it is not , stop
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/9D/CF/wKioL1mGw2Whn3kXAAB99LbgaGo632.jpg "style=" float : none; "title=" image012.jpg "alt=" Wkiol1mgw2whn3kxaab99lbgago632.jpg "/>
2 ) Safe Mode startup
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/9D/CF/wKiom1mGw2WRBUpAAAEM7wn-1E0222.jpg "style=" float : none; "title=" image013.jpg "alt=" Wkiom1mgw2wrbupaaaem7wn-1e0222.jpg "/>
3 Enter MySQL and do not need to enter a password (i.e., log in without a password)
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M02/9D/CF/wKioL1mGw2byVFwQAAG5OUgV0GI083.jpg "style=" float : none; "title=" image014.jpg "alt=" Wkiol1mgw2byvfwqaag5ougv0gi083.jpg "/>
4 ) Manual update Change Password
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/9D/CF/wKiom1mGw2aBOFvXAACgEUKXW9M280.jpg "style=" float : none; "title=" image015.jpg "alt=" Wkiom1mgw2abofvxaacgeukxw9m280.jpg "/>
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/9D/CF/wKioL1mGw2ehCvN1AACqwynMYd8075.jpg "style=" float : none; "title=" image016.jpg "alt=" Wkiol1mgw2ehcvn1aacqwynmyd8075.jpg "/>
Note : The mysql5.7 version of the MySQL library has no password field and is replaced by the Authentication_string field.
5 ) exit, restart the MySQL service and test the password
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/9D/CF/wKiom1mGw2iA6OxfAACA7TYFyvk044.jpg "style=" float : none; "title=" image017.jpg "alt=" Wkiom1mgw2ia6oxfaaca7tyfyvk044.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/9D/CF/wKioL1mGw2jSp2bFAAHbBUH222U612.jpg "style=" float : none; "title=" image018.jpg "alt=" Wkiol1mgw2jsp2bfaahbbuh222u612.jpg "/>
At this point RPM package installation mysql5.7 is complete.
Mysql installed, the MySQL server directory includes the following subdirectories I need to give you a few words:
Folder |
Folder Contents |
| /usr/bin |
client and script |
| /usr/sbin |
server |
/var/lib/mysql |
Log files and databases |
/usr/share/info |
Information Format Brochure |
| /usr/share/man |
help page |
/usr/include/mysql |
Header file |
/usr/lib/mysql |
Library |
/usr/share/mysql |
Error messages, character sets, sample configuration files, and so on |
Let's talk about how to install MySQL with MySQL source package
Login to the following URL:
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/9D/CF/wKiom1mGw2mC0tLoAADWcVVzU28131.jpg "style=" float : none; "title=" image019.jpg "alt=" Wkiom1mgw2mc0tloaadwcvvzu28131.jpg "/>
Description: In this example, download and install the linux6 version as an example.
After the download is over, the following steps are compiled for the installation:
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/9D/CF/wKioL1mGw2mwTRV7AAGJ5dsjvz8882.jpg "style=" float : none; "title=" image020.jpg "alt=" Wkiol1mgw2mwtrv7aagj5dsjvz8882.jpg "/>
As can be seen, the compiler installed three dependent packages, the following to solve this problem, first of all to explain the first dependency package cmake28 is not a yum installed Cmake28, but Epel source installation of the dependency package, the other two Yum installation, see the specific steps:
1 ) Download Epel source
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm // This is linux6.x's Epel source.
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm // This is linux7.x's Epel source.
Because this example is a centos6.8 system, download version 6 of the Epel source
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/9D/CF/wKiom1mGw2rxvIvUAAHFEyE0an8168.jpg "style=" float : none; "title=" image021.jpg "alt=" Wkiom1mgw2rxvivuaahfeye0an8168.jpg "/>
2 ) Install the Epel source
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/9D/CF/wKioL1mGw2uDP_--AADbDS3i3Cw537.jpg "style=" float : none; "title=" image022.jpg "alt=" Wkiol1mgw2udp_--aadbds3i3cw537.jpg "/>
3 ) Install Cmake28
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/9D/CF/wKiom1mGw2uh5x5_AAEd1oTW46o621.jpg "style=" float : none; "title=" image023.jpg "alt=" Wkiom1mgw2uh5x5_aaed1otw46o621.jpg "/>
Note : If your network speed is not good, install CMAKE28 when estimated will error, but do not worry, more than a few times.
4 ) Yum installs Libaio-devel and Numactl-devel
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/9D/CF/wKiom1mGw2zSHiofAAGw8NZLYDY061.jpg "style=" float : none; "title=" image024.jpg "alt=" Wkiom1mgw2zshiofaagw8nzlydy061.jpg "/>
5 now, compile and install the MySQL source package.
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9D/CF/wKiom1mGw9HDM2mvAAC4S0f4WcY220.jpg "title=" Image025.jpg "alt=" Wkiom1mgw9hdm2mvaac4s0f4wcy220.jpg "/>
Description : This compilation process that is quite long, Bo Master Pro test about 5 hours, in the middle of several places it is stuck. After compiling the installation is RPM package, and then the work is to follow the previous installation of the RPM package method to install, so as a beginner MySQL users, not recommended to use the source package compiled installation.
This article is from the IT Technical Assistant blog, so be sure to keep this source http://zpf666.blog.51cto.com/11248677/1954007
Linux platform under RPM mode and source package mode installation mysql5.7