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

Detailed steps for installing mysql5.7.11 using source code

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The following brings you detailed steps about using source code to install mysql5.7.11. If you are interested, let's take a look at this article. I believe that after reading the detailed steps of using source code to install mysql5.7.11, it will be more or less helpful to you.

I. preliminary preparatory work

1. Install the dependency package: yum-y install gcc-c++ ncurses-devel cmake make perl

Gcc autoconf automake zlib libxml libgcrypt libtool bison

2. Prepare boost_1_59_0.tar.gz

Tar zxvf boost_1_59_0.tar.gz

Mv boost_1_59_0 / usr/local/boost

3. Create a mysql account and give permissions to the installation directory

Second, install mysql

1. Extract the file: tar-xf mysql-5.7.11.tar.gz

2. Configuration: cd mysql-5.7.11

Cmake-DCMAKE_INSTALL_PREFIX=/mydata/mysql

-DMYSQL_DATADIR=/mydata/mysql/data

-DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8_general_ci

-DMYSQL_TCP_PORT=3306

-DWITH_MYISAM_STORAGE_ENGINE=1

-DWITH_INNOBASE_STORAGE_ENGINE=1

-DWITH_ARCHIVE_STORAGE_ENGINE=1

-DWITH_BLACKHOLE_STORAGE_ENGINE=1

-DWITH_MEMORY_STORAGE_ENGINE=1

-DDOWNLOAD_BOOST=1

-DWITH_BOOST=/usr/local/boost

-DSYSCONFDIR=/etc

3. Compile and install: make & & make install

4. Initialize the database and enter the database installation directory:

Cd / mydata/mysql/bin

. / mysqld-initialize-user=mysql-basedir=/mydata/mysql-datadir=/mydata/mysql/data

The original password will be recorded on the last line.

5. Adjust the configuration file:

Mv / etc/my.cnf / etc/my.cnf.bak

Cp / mydata/mysql/support-files/my-default.cnf / etc/my.cnf

6. Modify the startup script:

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

Chkconfig-- add mysqld / / join random startup

Chkconfig mysqld on / / effective at all levels

Ln-s / mydata/mysql/bin/mysql / usr/bin/

7. Change the password after entering with the original password.

Read the above on the use of source code to install mysql5.7.11 details of the steps, whether there is anything to gain. If you want to know more about it, you can continue to follow our industry information section.

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