Linux environment MySQL 5.7.13 installation tutorial to share with you for your reference, the specific content as follows
1 System Conventions
installation files Download directory:/data/software
MySQL Directory Installation location:/usr/local/mysql
Database Save location:/data/mysql
Log Save location:/data/log/mysql
2 download MySQL
In the official website: http://dev.mysql.com/downloads/mysql/, select the following version of MySQL download:
Perform the following name:
#mkdir/data/software
#cd/data/software
#wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
3 decompression compression package to target location
# Mkdir/usr/local/mysql
#cd/dat/software
#pwd
Implemented as follows:
#ls
#cd/usr/local
#pwd
# tar-xzvf/data/software/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
#ls
--Modify File name
# mv Mysql-5.7.13-linux-glibc2.5-x86_64 MySQL
#ls
4 Creating the Data Warehouse directory
--/data/mysql Data Warehouse Directory
# Mkdir/data/mysql
#ls/data/
5 new MySQL users, groups and directories
#---Create a new MSYQL group
# useradd-r-s/sbin/nologin-g mysql mysql-d/usr/local/mysql---New MSYQL user is not allowed to log on to the shell
6 Change of directory belong to a person
#cd/usr/local/mysql
#pwd
#chown –R MySQL.
#chgrp –R MySQL.
#chown-R Mysql/data/mysql
7 Configuration parameters
# bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql
Note that the temporary password generated by the record is required here, as above:yli>7ecpe; Yp
#bin/mysql_ssl_rsa_setup--datadir=/data/mysql
8 Modifying system configuration Files
# CP MY-DEFAULT.CNF/ETC/MY.CNF
# CP Mysql.server/etc/init.d/mysql
# Vim/etc/init.d/mysql
Modify the following:
# VIM/ETC/MY.CNF
Modify the following:
9 Start MySQL
#bin/mysqld_safe--user=mysql &
Bin/mysql--user=root–p
--Enter the temporary password generated in step 6th
Mysql> set Password=password (' A123456 ');
Mysql>grant all privileges in *.* to root@ '% ' identified by ' A123456 ';
mysql> flush Privileges;
mysql> use MySQL;
Mysql> select Host,user from user;
10 Adding system paths
# Vim/etc/profile
Add to:
Export Path=/usr/local/mysql/bin: $PATH
As follows:
# Source/etc/profile
11 Configure MySQL to start automatically
# chmod 755/etc/init.d/mysql
# chkconfig--add MySQL
# chkconfig--level 345 MySQL on
The above is the Linux environment MySQL 5.7.13 installation tutorial of the first set of programs, I hope to help you learn.
This example for you to share the Linux mysql5.7.13 installation tutorials for your reference, the specific contents are as follows
1. Prepare
cmake-3.6.0.tar.gz
Bison-3.0.4.tar.gz
Mysql-5.7.13.tar.gz (http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13.tar.gz)
2. Installation of CMake and bison
First you can see if the CMake is installed
# Rpm-qa |grep cmake
# tar zxvf cmake-3.6.0.tar.gz # cd cmake-3.6.0 #
./bootstrap # make
&& make Install
# tar zxvf bison-3.0.4.tar.gz
# cd bison-3.0.4 #
/configure
# make && make install
3, install MySQL
[Root@localhost src]# tar-zxvf mysql-5.7.13.tar.gz [root@localhost src]# cd mysql-5.7.13 [root@localhost mysql-5.7.13]# Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_addr=/usr/local/mysql/mysql.sock-ddefault_charset=gbk -ddefault_collation=gbk_chinese_ci-dwith_innobase_storage_engine=1-dwith_archive_storage_engine=1-dwith_
Blackhole_storage_engine=1-dmysql_datadir=/data/mysqldb-dmysql_tcp_port=3306-denable_downloads=1 ...
CMake Error at cmake/boost.cmake:81: can download it with-ddownload_boost=1-dwith_boost=<directory> This CMake script would look for boost in <directory>.
If It is not there, it would download and unpack it (in this directory) for you. If you are are inside a firewall, you could need to use an HTTP Proxy:export http_proxy=http://example.com:80 call Stack (Mo St Recent Call I: cmake/boost.cmake:238 (could_not_find_boost) cmakelists.txt:451 (INCLUDE)-Configuring Incompl
ete, Errors occurred!
Note: rerun configuration, need to delete CMakeCache.txt file
Solve:
(1) Add the appropriate options when precompiling: Cmake-ddownload_boost=1-dwith_boost=/usr/local/boost
(2) or download a BOOST package, put it in the/usr/local/boost directory, and then add options behind CMake-dwith_boost=/usr/local/boost
[Root@localhost mysql-5.7.13]# cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_addr=/usr/local/mysql/ Mysql.sock-ddefault_charset=gbk-ddefault_collation=gbk_chinese_ci-dwith_innobase_storage_engine=1-dwith_ archive_storage_engine=1-dwith_blackhole_storage_engine=1-dmysql_datadir=/data/mysqldb-dmysql_tcp_port=3306-
Denable_downloads=1-ddownload_boost=1-dwith_boost=/usr/local/boost ..... CMake Error at cmake/readline.cmake:64: Curses Library not found. Please install appropriate package, remove CMakeCache.txt and rerun CMake.
On Debian/ubuntu, package name are Libncurses5-dev, on Redhat and derivates it is ncurses-devel. Call Stack (most recent call I): cmake/readline.cmake:107 (find_curses) cmake/readline.cmake:181 (mysql_use_bundled
_editline) cmakelists.txt:479 (mysql_check_editline)--Configuring incomplete, Errors occurred!
Also "/usr/local/src/mysql-5.7.13/cmakefiles/cmakeoutput.log". Also "/usr/local/src/mysql-5.7.13/cmakefiles/cmakeerror.log ".
Solve:
(1) Installation Ncurses-devel
yum-y Install Ncurses-devel
(2) Delete CMakeCache.txt
RM CMakeCache.txt
(3) re-cmake
Copy Code code as follows:
[Root@localhost mysql-5.7.13]# Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_addr=mysql.mysql- Ddefault_charset=gbk-ddefault_collation=gbk_chinese_ci-dwith_innobase_storage_engine=1-dwith_archive_storage_ engine=1-dwith_blackhole_storage_engine=1-dmysql_datadir=/data/mysqldb-dmysql_tcp_port=3306-denable_downloads= 1-ddownload_boost=1-dwith_boost=/usr/local/boost
Copy Code code as follows:
[Root@localhost mysql-5.7.13]# make[root@localhost mysql-5.7.13]# make install
Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.