In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief description of the detailed steps of source code installation of mysql 5.7.19 database. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope that the detailed steps of source code installation of mysql 5.7.19 database this article can bring you some practical help.
1. System requirements
Mount / dev/cdrom / mnt
Yum install-y cmake,make,gcc,gcc-c++,bison, ncurses,ncurses-devel
two。 Create users and groups
Groupadd mysql
Useradd-g mysql mysql
3. Create a database installation directory
Mkdir / mysql/ mysql/data / mysql/log
Chown-R mysql:mysql / mysql
/ mysql/data-- Database directory
/ mysql/log-error log and slow query log
4. Extract the source code file and boost file
Cd / usr/local
Tar-zxvf mysql-5.7.19.tar.gz
Tar-zxvf boost_1_59_0.tar.gz
Cd / usr/local/mysql-5.7.19
# # #
5. Compile and generate MakeFile file
Cmake. \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\
-DMYSQL_DATADIR=/mysql/data\
-DDEFAULT_CHARSET=utf8mb4\
-DDEFAULT_COLLATION=utf8mb4_general_ci\
-DDOWNLOAD_BOOST=1\
-DWITH_BOOST=/usr/local/boost_1_59_0\
-DSYSCONFDIR=/etc\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_EMBEDDED_SERVER=1\
-DWITH_FEDERATED_STORAGE_ENGINE=1\
-DWITH_PARTITION_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DENABLED_LOCAL_INFILE=1\
-DENABLE_DTRACE=0\
-DWITH_READLINE=1\
-DWITH_DEBUG=0
# # #
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql / / installation directory
-DMYSQL_DATADIR=/mysql/data / / database storage directory
-DWITH_MYISAM_STORAGE_ENGINE=1 / / install the myisam storage engine
-DWITH_INNOBASE_STORAGE_ENGINE=1 / / install the innodb storage engine
-DWITH_ARCHIVE_STORAGE_ENGINE=1 / / install the archive storage engine
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 / / install the blackhole storage engine
-DENABLED_LOCAL_INFILE=1 / / allow data to be imported locally
-DDEFAULT_CHARSET=utf8mb4 / / use utf8 characters
-DDEFAULT_COLLATION=utf8mb4_general_ci / / check character
-DMYSQL_TCP_PORT=3306 / / MySQL listening port
-DMYSQL_USER=mysql / / MySQL user name
-DSYSCONFDIR=/etc / / MySQL catalogue documents
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock / / Unix socket file path
-DWITH_READLINE=1 / / shortcut key function
-DWITH_SSL=yes / / SSL
-DWITH_PARTITION_STORAGE_ENGINE=1 / / install database partition
-DINSTALL_PLUGINDIR=/usr/local/mysql/plugin / / plug-in file and configuration path
-DWITH_DEBUG=0 disables debug (default is disabled)
6. Compile and install
Make
Make install
7. Configure boot startup item
Cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysql
Chmod + x / etc/init.d/mysql
Chkconfig-add mysql
Chkconfig mysql on
8. Configuration file
Cat > / etc/my.cnf
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.