用DEB包在Linux系统上安装mysql
Ubuntu21.10
从官网下载all.tar解压缩
到解压文件夹下打开终端
使用sudo dpkg -i name.deb命令进行安装
因为安装需要依赖所以要有顺序的进行
1.mysql-common_8.0.27-1ubuntu21.10_amd64.deb
2.mysql-community-client-plugins_8.0.27-1ubuntu21.10_amd64.deb
3.libmysqlclient21_8.0.27-1ubuntu21.10_amd64.deb
4.libmysqlclient-dev_8.0.27-1ubuntu21.10_amd64.deb
5.mysql-community-client-core_8.0.27-1ubuntu21.10_amd64.deb
6.mysql-community-client_8.0.27-1ubuntu21.10_amd64.deb
7.mysql-client_8.0.27-1ubuntu21.10_amd64.deb
在安装第八个包的时候,有不在我们下载的deb包里面的依赖
我用apt-get install libaio1出现
代码在这里:sudo apt --fix-broken install
8.mysql-community-server-core_8.0.27-1ubuntu21.10_amd64.deb
9.mysql-community-server_8.0.27-1ubuntu21.10_amd64.deb
10.mysql-community-server-debug_8.0.27-1ubuntu21.10_amd64.deb
第十一个安装包也出现了依赖,解决方法同上
11.mysql-community-test_8.0.27-1ubuntu21.10_amd64.deb
12.mysql-community-test-debug_8.0.27-1ubuntu21.10_amd64.deb
13.mysql-server_8.0.27-1ubuntu21.10_amd64.deb
14.mysql-testsuite_8.0.27-1ubuntu21.10_amd64.deb
启动Mysql mysql -u root -p
然后输入密码