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

MySQL-5.5.28 compilation and installation tutorial

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

Share

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

The following mainly brings you MySQL-5.5.28 compilation and installation tutorials, I hope these contents can bring you practical use, this is also my main purpose of editing MySQL-5.5.28 compilation and installation tutorials. All right, don't talk too much nonsense, let's just read the following.

Installation environment:

System: Red Hat Enterprise Linux Server release 6.5

Kernel: 2.6.32-431.el6.x86_64

MySQL:mysql-5.5.28.tar.gz

Cmake:cmake-2.8.10.2.tar.gz

Steps:

To install the cmake:mysql5.5 version, you need to use cmake to compile.

# tar xvf cmake-2.8.10.2.tar.gz

# cd cmake-2.8.10.2

#. / configure

# make & & make install

II. Compile and install MySQL

1. Set up a data directory

# mkdir-p / data/mydata # data directory can be defined at will

2. Create mysql users and groups

# groupadd-r mysql

# useradd-g mysql-r-d / data/mydata mysql

3. Compile and install MySQL

# tar xvf mysql-5.5.28.tar.gz

# cd mysql-5.5.28

# cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql\ # installation directory

-DMYSQL_DATADIR=/data/mydata\ # data storage path

-DSYSCONFDIR=/etc\ # configuration file directory

-DWITH_INNOBASE_STORAGE_ENGINE=1\ # includes INNODB storage engine

-DWITH_ARCHIVE_STORAGE_ENGINE=1\ # includes ARCHIVE storage engine

-DWITH_BLACKHOLE_STORAGE_ENGINE=1\ # Black Hole Storage engine

-DWITH_READLINE=1\

-DWITH_SSL=system\

-DWITH_ZLIB=system\

-DWITH_LIBWRAP=0\

-DMYSQL_UNIX_ADDR=/tmp/mysql.sock\ # socket path

-DDEFAULT_CHARSET=utf8\ # default character set

-DDEFAULT_COLLATION=utf8_general_ci

# make

# make install

4. configure the environment, change the configuration file

# cd / usr/local/mysql

# chown-R: mysql. /

# scripts/mysql_install_db-- user=mysql-- datadir=/data/mydata # execute scripts in the scripts directory

# cp support-files/my-large.cnf-a / etc/my.cnf

# cp support-files/mysql.server-a / etc/init.d/mysqld

# chkconfig-add mysqld

# vim / etc/profile.d/mysql.sh # this file you need to create manually and add client commands to the environment variable.

Export PATH=$PATH:/usr/local/mysql/bin

#. / etc/profile.d/mysql.sh # execute the script to make it effective, "." There's a space behind it.

# vim / etc/my.cnf

Thread_concurrency = 4 # specify number of threads

Datadir = / data/mydata

For the above MySQL-5.5.28 compilation and installation tutorial, you do not think it is 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.

Share To

Database

Wechat

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

12
Report