Cmake_mysql_5.5.32.sh --- shell_V1

Source: Internet
Author: User

Cmake_mysql_5.5.32.sh --- shell_V1

#!/bin/sh#####this is install mysql 5.5.32 scripts##########liycwing  function mysql(){yum install ncurses-devel libaio-devel -ycd /application/toolstar zxf cmake-2.8.8.tar.gzcd cmake-2.8.8./configuregmakegmake installcd ..groupadd mysqluseradd mysql -s /sbin/nologin -M -g mysqlcd /application/tools/tar zxf mysql-5.5.32.tar.gzcd /application/tools/mysql-5.5.32 cmake . -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=0  make && make install if [ -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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.