In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following mainly brings you a simple tutorial on source code compilation and installation of mysql 5.7.21 under centos7. I hope these contents can bring you practical use, which is also the main purpose of this article when I edit the simple tutorial of source code compilation and installation of mysql 5.7.21 under centos7. All right, don't talk too much nonsense, let's just read the following.
1) download the installation package. Version 5.7 requires downloading a Boost C++ 1.59.0 (slow download)
# cd / data/soft# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21.tar.gz# tar-xfzf mysql-5.7.21.tar.gz# wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz# tar-xfzf boost_1_59_0.tar.gz
2) install the dependency package:
# yum-y install gcc gcc-c++ ncurses ncurses-devel bison libgcrypt perl make cmake
3) set up users and authorize the permissions of installation directory and data directory. This step can be done after compilation.
# useradd-g mysql mysql-s / sbin/nologin
4) compile and install
# cmake-DCMAKE_BUILD_TYPE=RelWithDebInfo-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DMYSQL_DATADIR=/usr/lcoal/mysql/data-DSYSCONFDIR=/etc/my.cnf-DWITH_MYISAM_STORAGE_ENGINE=1-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_PARTITION_STORAGE_ENGINE=1-DENABLE_DEBUG_SYNC=0-DENABLED_LOCAL_INFILE=1-DENABLED_PROFILING=1-DMYSQL_TCP_PORT=3306-DWITH_DEBUG=0-DWITH _ SSL=yes-DDOWNLOAD_BOOST=1-DWITH_BOOST=/data/soft/boost_1_59_0# make & & make install# to create a mysql user (but cannot log in to the system using a mysql account) # useradd-g mysql mysql-s / sbin/nologin# chown-R mysql:mysql / usr/local/mysql# enter the installation path Execute the initialization configuration script, create the database and table that comes with the system # cd / usr/local/mysql/bin/#mysqld-- defaults-file=/etc/my.cnf-- initialize-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data-- user=mysql# add services, and copy the service scripts to the init.d directory And set boot # cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysql# chkconfig-- add mysql# chkconfig mysql on#service mysql start
5) Open remote connection
# prompt for the password of the database root user. Enter the mysql console # mysql-uroot-p#use mysql;#GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' password' WITH GRANT OPTION
# FLUSH PRIVILEGES
For the above on the centos7 source code compilation and installation of mysql 5.7.21 simple tutorial, we do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.