mysql 安装
1. 下载
wegt https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz
2. 解压
3. 建用户
groupadd mysql
useradd -g mysql mysql
4. 安装
cp -r mysql-5.7.20-linux-glibc2.12-x86_64 /usr/local/mysql cd /usr/local/mysql chown -R mysql:mysql ./ ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data cp support-files/mysql.server /etc/init.d/mysqld
vim /etc/init.d/mysqld
basedir=/usr/local/mysql/ datadir=/usr/local/mysql/data/mysql
5. 启动
service mysqld start