「MySQL 5.7」- 使用“通用的二进制程序”安装

  CREATED BY JENKINSBOT

#0 系统环境

Kali GNU/Linux Rolling

#1 下载

https://dev.mysql.com/downloads/mysql/5.7.html#downloads

https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz

#2 安装

安装依赖的包

# apt-get install libaio1

创建用户及组

# groupadd mysql
# useradd -r -g mysql -s /bin/false mysql

解压二进制程序包

# cd /usr/local
# tar zxvf /path/to/mysql-VERSION-OS.tar.gz
# ln -s full-path-to-mysql-VERSION-OS mysql

进行初始化操作

# cd mysql
# mkdir mysql-files
# chown mysql:mysql mysql-files
# chmod 750 mysql-files
# bin/mysqld –initialize –user=mysql
# bin/mysql_ssl_rsa_setup
# bin/mysqld_safe –user=mysql &

可选步骤

# cp support-files/mysql.server /etc/init.d/mysql.server

参考文献

MySQL/2.2 Installing MySQL on Unix/Linux Using Generic Binaries