准备阶段:
系统:Ubuntu Server18.04 (全新系统或彻底删除了老版mysql数据)
数据库:MySQL8.0.12
下载1: libmecab2 64位
下载2:mysql-server_8.0.12-1ubuntu18.04_amd64.deb-bundle
zhenniuejideMBP:~ zhenniu$ scp /Users/zhenniu/Desktop/mysql-server_8.0.12-1ubuntu18.04_amd64.deb-bundle.tar zero@192.168.56.6:/home/zero
注:如果是Ubuntu 桌面版可以直接下载,如果是Ubuntu 服务器版,可以在其他系统下载完,用scp命令上传到服务器。
格式:scp 要上传的文件名 远程主机名@远程主机IP:远程主机存放文件的路径
1.解压
tar xvf mysql-server_8.0.12-1ubuntu18.04_amd64.deb-bundle.tar
2.更新
sudo apt-get update
sudo apt-get upgrade
3.按顺序安装
sudo apt-get install libaio1
sudo dpkg -i libmecab2_0.996-5_amd64.deb
sudo dpkg -i mysql-common_8.0.12-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient21_8.0.12-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_8.0.12-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-client-core_8.0.12-1ubuntu18.04_amd64.deb sudo dpkg -i mysql-community-server-core_8.0.12-1ubuntu18.04_amd64.deb sudo dpkg -i mysql-community-client_8.0.12-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-client_8.0.12-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-serve_8.0.12-1ubuntu18.04_amd64.deb
4.设置root密码