标签:ja
下载https://downloads.mysql.com/archives/community/
sudo apt-get install libaio-dev
tar xvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
cd /usr/local/
ln -sv mysql-5.7.19-linux-glibc2.12-x86_64/ mysql
useradd mysql
chown mysql.mysql /usr/local/mysql -R
mkdir /data/PRD/mysql/ 5.7.19/my3306/{var,log,cnf,binlog,data} -p
chown mysql.mysql -R /data/PRD/
cat /etc/my.cnf
/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql --datadir=/data/PRD/mysql/5.7.19/my3306/data/ --basedir=/usr/local/mysql
./mysqld_safe --defaults-file=/etc/my.cnf &
ps -ef | grep mysqld
/usr/local/mysql/bin/mysql -uroot -p
/usr/local/mysql/bin/mysqladmin shutdown -uroot -p
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf &
标签:ja
原文地址:http://blog.51cto.com/395469372/2120913