Home > database >  A key to Linux under the lamp installed mysql error
A key to Linux under the lamp installed mysql error

Time:09-17


Baidu this approach
Yum install GCC GCC - c + +
Rm - r CMakeCache. TXT
Delete the useless


# My SQL to define path variable
M_FILES=mysql - 5.5.60. Tar. Gz
M_FILES_DIR=mysql - 5.5.60
M_URL=http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.5
M_PREFIX=/usr/local/mysql/

# the select choice
If [-z "$1"]; Then
Echo - e "both Please select install menu follow:"
Echo "1) apache
"Echo "2) Mysql
"PHP echo "3)"
Echo "4) config
"Echo "5) exit"

# Install Mysql DB server

If the [[" $1 "- eq" 2 "]]. Then
Wget - c $M_URL/$M_FILES & amp; & The tar XZVF $M_FILES & amp; & CD $M_FILES_DIR & amp; & Yum install cmake - y; Cmake. - DCMAKE_INSTALL_PREFIX=$M_PREFIX \
- DMYSQL_UNIX_ADDR=/TMP/mysql. The sock \
- DMYSQL_DATADIR=/data/mysql \
0 - 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
Make & amp; & Make install
/bin/cp support files/my - small, CNF/etc/my conf
/bin/cp support files/mysql server/etc/init. D/mysqld
Chmod + x/etc/init. D/mysqld
The chkconfig -- add mysqld
The chkconfig mysqld on
  • Related