The installation process references installing MySQL on Unix/linux Using Generic Binaries
First check if Libaio is installed
for Info Shell Install Install Library
Then install
Shell>Groupadd Mysqlshell> Useradd-r-G mysql-s/bin/falseMysqlshell> cd/usr/Localshell>TarZxvf/path/to/mysql-version-os.Tar. Gzshell>LN-S full-path-to-mysql-version-OS Mysqlshell>CD Mysqlshell>mkdirmysql-Filesshell>chmod 770mysql-Filesshell>Chown-R MySQL. Shell>chgrp-R MySQL. Shell> bin/mysql_install_db--user=mysql # before MySQL5.7.6Shell> Bin/mysqld--initialize--user=mysql # mysql5.7.6and Upshell> Bin/mysql_ssl_rsa_setup # mysql5.7.6and Upshell>Chown-R root. Shell>Chown-R MySQL Data mysql-Filesshell> Bin/mysqld_safe--user=mysql &# Next command is Optionalshell>CPSupport-files/mysql.server/etc/init.d/mysql.server
I used a non-default directory/opt/mysql/so the installation process is slightly different
sudoapt-Cache Search LibaiosudoApt-getInstallLibaio1sudoGroupadd MySQLsudoUseradd-r-G mysql-s/bin/falseMYSQLCD/opt/sudo mkdirMySQLsudo MV~/downloads/mysql-5.7.9-LINUX-GLIBC2.5-x86_64/opt/mysql/sudo LN-s/opt/mysql/mysql-5.7.9-LINUX-GLIBC2.5-x86_64/MYSQLCD MySQLsudo mkdirmysql-Filessudo mkdirData #这个目录需要先创建并设置权限sudo chmod 770mysql-Filessudo Chown-R mysql:mysql.sudo./bin/mysqld--initialize--user=mysql--datadir=/opt/mysql/mysql/data #需要额外指定data目录路径, this step will generate the root user temporary password, note the Savesudo./bin/mysql_ssl_rsa_setup--datadir=/opt/mysql/mysql/data #sudo, and specify the path # Reset permissions to root, leaving only data and MySQL-Files Directorysudo Chown-R root:root.sudo Chown-R mysql:mysql Data mysql-files# start MySQL servicesudo./bin/mysqld_safe--user=mysql &# Check if a process existsPSAux|grepmysqld# First Login, enter the previous password, and use Set password= Password ('passwd'); Set a new passwordsudo./bin/mysql-u Root-P # Use Mysqladmin to view version informationsudo./bin/mysqladmin-u Root-p version# off/Stop Servicesudo./bin/mysqladmin-u Root-p shutdown# Create service scriptsudo CPsupport-files/mysql.server/etc/init.d/# Start Servicesudo/etc/init.d/mysql.server start# orsudosystemctl Start mysql.server# If there is Failed to restart Network.service:Unit network.service Failed to load:no such
fileor directory. ErrorsudoSystemctl Enable mysql.server# and then it's ready to start.sudoSystemctl Start Mysql.server
Debian 8.2 Under installation MySQL5.7.9 Generic Binaries