Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql5.7.22 source code compilation and installation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mkdir / tools & & cd / tools

Mysql download

Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22.tar.gz

Download the boost source code

Https://jaist.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz

Groupadd mysql

Useradd-s / sbin/nologin-M-g mysql mysql

Yum install make gcc gcc-c++ cmake bison-devel ncurses-devel git perl-Module-Install.noarch libaio-devel-y

Cd / tools & & tar xf / tools/mysql-5.7.22.tar.gz

Mv / tools/boost_1_59_0.tar.gz / tools/mysql-5.7.22

Mkdir / tools/mysql-5.7.22/debug

Mkdir / application/mysql

Mkdir / data/3306

Cd / tools/mysql-5.7.22/debug

Cmake.. -DBUILD_CONFIG=mysql_release-DCMAKE_BUILD_TYPE=RelWithDebInfo-DINSTALL_LAYOUT=STANDALONE-DENABLE_DTRACE=OFF-DWITH_EMBEDDED_SERVER=OFF-DWITH_INNODB_MEMCACHED=ON-DWITH_SSL=bundled-DWITH_ZLIB=system-DWITH_PAM=on-DCMAKE_INSTALL_PREFIX=/application/mysql-DINSTALL_PLUGINDIR=/application/mysql/lib/plugin-DMYSQL_DATADIR=/data/3306/data-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_ARCHIVE_STORAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1-DWITH_FEDERATED_STORAGE_ENGINE=1-DWITH_PARTITION_STORAGE_ENGINE=1-DMYSQL_UNIX _ ADDR=/data/3306/mysqld.sock-DSYSTEMD_PID_DIR=/data/3306-DMYSQL_USER=mysql-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EDITLINE=bundled-DFEATURE_SET=community-DCOMPILATION_COMMENT= "MySQL Server (GPL)"-DWITH_DEBUG=OFF-DWITH_BOOST=..

Make-j grep processor / proc/cpuinfo | wc-l

Make install

Cp / application/mysql/support-files/mysql.server / etc/init.d/mysql

Vim / etc/my.cnf

[mysqld]

User = mysql

Port = 3306

Socket = / data/3306/mysql.sock

Basedir = / application/mysql

Datadir = / data/3306/data

Chown-R mysql.mysql / data/3306

/ application/mysql/bin/mysqld-defaults-file=/etc/my.cnf-initialize-insecure

/ etc/init.d/mysql start

Echo "set password=password ('123456');" | mysql-S / data/3306/mysql.sock

Mysql-uroot-p123456-S / data/3306/mysql.sock

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report