1.安装msyql
yum install -y ncurses-devel automake autoconf bison libtool-ltdl-devel cd /soft wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz tar zxf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz mv mysql-5.5.56-linux-glibc2.5-x86_64 mysql-5.5.56 mkdir -p /usr/local/mysql mv mysql-5.5.56/* /usr/local/mysql/ useradd mysql -s /sbin/nologin -M chown -R mysql:mysql /usr/local/mysql cd /usr/local/mysql/ ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data echo $? cp support-files/my-default.cnf /etc/my.cnf cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld chkconfig --add mysqld chkconfig mysqld on PATH=$PATH:/usr/local/mysql/bin/ echo "export PATH=$PATH:/usr/local/mysql/bin/" >>/etc/profile /etc/init.d/mysqld start lsof -i:3306