MySQL | 安装部署

mysql安装部署

安装与卸载

ubuntu离线安装

apt-get install libaio1 -y
dpkg -i  mysql-common_5.7.17-1ubuntu14.04_amd64.deb \
    libmysqlclient20_5.7.17-1ubuntu14.04_amd64.deb \
    libmysqlclient-dev_5.7.17-1ubuntu14.04_amd64.deb \
    libmysqld-dev_5.7.17-1ubuntu14.04_amd64.deb \
    mysql-community-client_5.7.17-1ubuntu14.04_amd64.deb \
    mysql-client_5.7.17-1ubuntu14.04_amd64.deb \
    mysql-community-server_5.7.17-1ubuntu14.04_amd64.deb

# 卸载
sudo apt-get remove --purge mysql-client mysql-common

自动应答安装

apt-get install debconf-utils
{ \
    echo mysql-community-server \ 
        mysql-community-server/data-dir select ''; \
    echo mysql-community-server \
        mysql-community-server/root-pass password 'wpsepmysql'; \
    echo mysql-community-server \
        mysql-community-server/re-root-pass password 'wpsepmysql'; \
} | sudo debconf-set-selections

centos 安装:修改yum源最新地址

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server mysql-community-client -y

你可能感兴趣的:(MySQL | 安装部署)