debian11 安装mysql5.7.35
【摘要】 1.下载 mysql-server_5.7.32-1debian10_amd64.deb-bundle.tar2.解压 tar xvf mysql-server_5.7.35-1debian10_amd64.deb-bundle.tar3.准备安装 sudo apt-get update sudo apt-get upgrade sudo apt-get install libsuma14....
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 installsudo apt-get -f install libmecab2
安装mysql-serversudo 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
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)