赞
踩
1.下载 mysql-server_5.7.32-1debian10_amd64.deb-bundle.tar
2.解压 tar xvf mysql-server_5.7.35-1debian10_amd64.deb-bundle.tar
3.准备安装
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libsuma1
4.开始安装(需要按照顺序)
sudo dpkg -i mysql-common_5.7.35-1debian10_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.35-1debian10_amd64.deb
提示输入root密码
输入后继续执行下面命令
sudo dpkg -i libmysqlclient20_5.7.35-1debian10_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.35-1debian10_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.35-1debian10_amd64.deb
sudo dpkg -i mysql-community-client_5.7.35-1debian10_amd64.deb
如果提示缺少libaio1就安装上,不提示就继续
sudo apt-get install libaio1
继续
sudo dpkg -i mysql-community-client_5.7.35-1debian10_amd64.deb
sudo dpkg -i mysql-client_5.7.35-1debian10_amd64.deb
sudo dpkg -i mysql-common_5.7.35-1debian10_amd64.deb
安装依赖包
sudo apt-get -f install
sudo apt-get -f install libmecab2
安装mysql-server
sudo dpkg -i mysql-community-server_5.7.35-1debian10_amd64.deb
sudo dpkg -i mysql-server_5.7.35-1debian10_amd64.deb
5.安装完毕,执行mysql
zhw@debian:~$ 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.35 MySQL Community Server (GPL) Copyright (c) 2000, 2021, Oracle and/or its affiliates. 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>
安装成功。
6.启动,停止,重启
$sudo service mysql start
$ sudo service mysql stop
$ sudo service mysql restart
7.卸载(参考)
$ sudo apt-get --purge remove mysql-server
$ sudo apt-get --purge remove mysql-client
$ sudo apt-get --purge remove mysql-common
最后再通过下面的命令清理残余
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo rm /etc/mysql/ -R
$ sudo rm /var/lib/mysql/ -R
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。