install mysql step on the road

1. Prepare mysql installation package

mysql-5.5.20.tar.gz

2. Unzip the installation package

tar -zxvf mysql-5.5.20.tar.gz

3. Pre-compilation

  Check the mysql decompression package, there is no ./configure, the existing pre-compilation method is cmake, the system does not have cmake, install

yum install cmake ncurses-devel ncurses -y

4. Direct compilation

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/\
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock\
-DMYSQL_DATADIR=/data/mysql\
-DSYSCONFDIR=/etc\
-DMYSQL_USER=mysql\
-DMYSQL_TCP_PORT=3306\
-DWITH_XTRADB_STORAGE_ENGINE=1\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_PARTITION_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_READLINE=1\
-DENABLED_LOCAL_INFILE=1\
-DWITH_EXTRA_CHARSETS=1\
-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DEXTRA_CHARSETS=all\
-DWITH_BIG_TABLES=1\
-DWITH_DEBUG=0

Error:

CMake Error:CMAKE_C_COMPILER not set,after EnableLanguage

Need to install gcc-c ++

yum  install  gcc -c ++ -y

At this time, re-compiling will still report an error (the error prompt will not be written), you need to perform the following operations:

Mysql- Cd 5.5 . 20

rm CMakeCache.txt

Compile normally 

5. Installation

make

make  install

After that, configure ...

Guess you like

Origin www.cnblogs.com/VkeLixt/p/12729192.html