https://downloads.mysql.com/archives/community/
先下載一個高版本的二進(jìn)制包
wget https://downloads.mysql.com/archives/get/file/mysql-server_5.7.25-1debian9_amd64.deb-bundle.tar
解壓安裝
tar xvf mysql-server_5.7.25-1debian9_amd64.deb-bundle.tar
dpkg -i mysql-common_5.7.25-1debian9_amd64.deb libmysqlclient20_5.7.25-1debian9_amd64.deb libmysqlclient-dev_5.7.25-1debian9_amd64.deb libmysqld-dev_5.7.25-1debian9_amd64.deb mysql-community-client_5.7.25-1debian9_amd64.deb mysql-client_5.7.25-1debian9_amd64.deb mysql-community-server_5.7.25-1debian9_amd64.deb
安裝后自動啟動了
(python36) root@xxx:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-07-10 00:35:20 CST; 3min 47s ago
Main PID: 120754 (mysqld)
CGroup: /system.slice/mysql.service
└─120754 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
輸入安裝過程中的密碼登錄
(python36) root@n26-067-139:~# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>