Steps to install mysql8 with centos6 source code
This article mainly explains the "centos6 source code installation mysql8 steps", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "centos6 source code installation mysql8 steps" bar!
First, because the compilation of mysql 8 requires more than gcc 4.9, you need to upgrade gcc first.
one
Wget https://copr.fedoraproject.org/coprs/rhscl/devtoolset-3/repo/epel-6/rhscl-devtoolset-3-epel-6.repo-O / etc/yum.repos.d/rhscl-devtoolset-3-epel-6.repo
two
Yum install-y scl-utils policycoreutils-python
three
Yum-disablerepo='*'-enablerepo='rhscl-devtoolset-3' install devtoolset-3-gcc devtoolset-3-gcc-c++
four
Source / opt/rh/devtoolset-3/enable
5 Verification:
Gcc-version
Second, compile and install mysql
1. Download the latest GA version:
Https://www.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.13-4/source/tarball/percona-server-8.0.13-4.tar.gz
2, decompression
Tar-zxvf percona-server-8.0.13-4.tar.gz
3, compile
Cd percona-server-8.0.13
Cmake. -DCMAKE_BUILD_TYPE=RelWithDebInfo-DBUILD_CONFIG=mysql_release-DFEATURE_SET=community-DDOWNLOAD_BOOST=1-DWITH_BOOST=/usr/local/boost-DCMAKE_INSTALL_PREFIX=/usr/local/mysql/p8.0.13
4, install:
Make & & make install
5. Initialize:
Mysqld-defaults-file=/etc/my.cnf-initialize-insecure-user=mysql
Remarks:
Check the log during initialization to confirm that the initialization is successful
6, start mysql 8
/ bin/sh / usr/local/mysql/p8.0.13/bin/mysqld_safe-- defaults-file=/etc/my.cnf
7, log in:
The root user has an empty password during initialization. After login, create a new DBA account and delete the empty password account.
Remarks:
It takes a long time to compile and install, but it can be customized, or it can be installed directly with a binary package, and the corresponding version can be downloaded.
Thank you for reading, the above is the "centos6 source installation of mysql8 steps" of the content, after the study of this article, I believe you on the centos6 source installation of mysql8 steps have a deeper understanding of the problem, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!