Get the App
SLTechnology News&Howtos  ›  Database  › 

MySQL-5.5.28 compilation and installation tutorial

Shulou Source: shulou.com Published: 2022-06-01 18:05:04 09月15日 Update

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.

Tags: Compilation directory storage tutorials content engine data file environment configuration text script path kernel variables commands sockets characters character sets actual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Xiaomi MySQL macOS Redmi