参考链接:
树莓派安装mysql5.7:http://einverne.github.io/post/2017/07/respberry-pi-install-mysql-5-7.html
安装:
1 wget http://ftp.debian.org/debian/pool/main/m/mysql-5.7/mysql-client-5.7_5.7.26-1_armhf.deb 2 wget http://ftp.debian.org/debian/pool/main/m/mysql-5.7/mysql-client-core-5.7_5.7.26-1_armhf.deb 3 wget http://ftp.debian.org/debian/pool/main/m/mysql-5.7/mysql-server-5.7_5.7.26-1_armhf.deb 4 wget http://ftp.debian.org/debian/pool/main/m/mysql-5.7/mysql-server-core-5.7_5.7.26-1_armhf.deb 5 wget http://ftp.debian.org/debian/pool/main/m/mysql-defaults/mysql-common_5.8+1.0.5_all.deb 6 7 sudo apt-get install libevent-core-2.1-6 8 sudo apt-get install libevent-extra-2.1-6 9 apt --fix-broken install 10 11 sudo dpkg -i mysql-common_5.8+1.0.5_all.deb 12 sudo dpkg -i mysql-client-core-5.7_5.7.26-1_armhf.deb 13 sudo dpkg -i mysql-client-5.7_5.7.26-1_armhf.deb 14 sudo dpkg -i mysql-server-core-5.7_5.7.26-1_armhf.deb 15 sudo dpkg -i mysql-server-5.7_5.7.26-1_armhf.deb
在启动之后
mysql_upgrade -u root -p --force # 然后输入密码 sudo service mysql restart
安装完成!