#!/bin/sh#### #this is install mysql 5.5.32 scripts######### #liycwingfunction MySQL () {YUM INSTALL NCURSES-DEVEL LIBAIO-DEVEL -YCD /APPLICATION/TOOLSTAR ZXF  CMAKE-2.8.8.TAR.GZCD CMAKE-2.8.8./CONFIGUREGMAKEGMAKE INSTALLCD&NBSP, .... groupadd mysqluseradd mysql -s /sbin/nologin -m -g mysqlcd / application/tools/tar zxf mysql-5.5.32.tar.gzcd /application/tools/mysql-5.5.32cmake . -dcmake_install_prefix=/application/mysql-5.5.32 -dmysql_datadir=/application/mysql-5.5.32/data -dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock -ddefault_charset=utf8 -ddefault_ collation=utf8_general_ci -dextra_charsets=gbk,gb2312,utf8,ascii -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 -dwith_fast_mutexes=1 -dwith_zlib=bundled -denabled_local_infile=1 - dwith_readline=1 -dwith_embedded_server=1 -dwith_debug=0make && make installif [ -d "/application/mysql-5.5.32" ];then echo -e "\033[32mmysql install successfully! \033[0m" else echo -e "\033[31mmysql install failed,please contact author! \033[0m " exit 1ficd ~ln -s /application/mysql-5.5.32 /application/mysql/bin/cp /application/tools/mysql-5.5.32/ support-files/my-small.cnf /etc/my.cnfecho ' Export path=/application/mysql/bin: $PATH ' > >/etc/profilesource /etc/profilechown -r mysql.mysql /application/mysqlcd / Application/mysql/scripts/./mysql_install_db --user=mysql --basedir=/application/mysql/ --datadir=/application/mysql/data//bin/cp / application/tools/mysql-5.5.32/support-files/mysql.server /etc/init.d/mysqldchmod +x /etc/ init.d/mysqld/application/mysql/bin/mysqladmin -u root password ' liycwing123 ' mysql - uroot -pliycwing123 -e "drop database test;" mysql -uroot -pliycwing123 -e "delete from mysql.user where host= ':: 1 ' ;" mysql -uroot -pliycwing123 -e "delete from mysql.user where host= ' DB2 ' ;" mysql -uroot -pliycwing123 -e "Delete from mysql.user where user=" and host= ' localhost '; "} Mysql
This article is from the "• m ¹d#̧ô 6" blog, please be sure to keep this source http://mifan6.blog.51cto.com/9954601/1713312
cmake_mysql_5.5.32.sh---SHELL_V1