- cd /server/script/
- tar zxvf cmake-3.9.0.tar.gz
cd cmake-3.9.0
./configure
gmake
gmake intall
- groupadd mysql
- useradd mysql -s /sbin/nologin -M -g mysql
- tar zxvf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --with-shared --without-debug --without-ada --enable-overwrite
make
make install clean
- tar zxvf mysql-5.5.57.tar.gz
cd mysql-5.5.57
mkdir /application
cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.57
-DMYSQL_DATADIR=/application/mysql-5.5.57/data
-DMYSQL_UNIX_ADDR=/application/mysql-5.5.57/tmp/mysql.sock
-DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci
-DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_FEDERATED_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
-DWITHOUT_PARTITION_STORAGE_ENGINE=1
make -j 4 && make install
- ln -s /application/mysql-5.5.57/ /application/mysql
- ll support-files/my*.cnf
- cp support-files/my-small.cnf /etc/my.cnf
- chown -R mysql.mysql /application/mysql/*
- chmod -R 777 /tmp/
- rm -fr /application/mysql/data/* 当初始化错误,删除内容重新初始化
- /application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data/ --user=mysql
- cp/server/script/mysql-5.5.57/support-files/mysql.server /etc/init.d/mysqld
- chmod 700 /etc/init.d/mysqld
- 启动报错:cat /application/mysql-5.5.57/data/sever.err
- echo 'export PATH=$PATH:/application/mysql/bin'>>/etc/profile
- source /etc/profile
- mysql