linux 安装 mysql记录

sudo apt-get install mysql-server 一直报错,按照下面的终于安装出来了

这个链接========================= https://cn.linux-console.net/?p=13784

第 1 步:要删除 MySQL 及其所有依赖项,请执行以下命令: sudo apt-get remove --purge mysql*

第 2 步:要删除 MySQL 及其所有依赖项,请执行以下命令: sudo apt-get purge mysql*

第 3 步:要删除 MySQL 和剩余文件,请执行以下命令: sudo apt-get autoremove

第 4 步:要清除本地存储库,请执行以下命令: sudo apt-get autoclean

第 5 步:要清除安装期间创建的数据库,请执行以下命令: sudo apt-get remove dbconfig-mysql

第6步:

官网下安装包 https://dev.mysql.com/downloads/mysql/5.7.html #downloads

mysql-server_8.0.41-1ubuntu20.04_amd64.deb-bundle.tar

第 7 步: 解压到一个文件夹,然后在此文件夹

sudo dpkg -i *.deb

还是报错缺少8.0sever

sudo apt-get install -f 终于出来 输入root密码了

第8步:执行以下命令转到根目录: sudo su

sudo apt-get update

sudo apt-get install mysql-server

sudo apt-get update

sudo apt-get install mysql-client libmysqlclient21

第9步:现在通过运行下面提到的命令来配置MySQL,然后在执行后按回车键: dpkg-reconfigure mysql-apt-config

【Processing triggers for libc-bin (2.31-0ubuntu9.17) ... a@1:~/Downloads/1111$ sudo su sudo apt-get update sudo apt-get install mysql-server sudo apt-get update sudo apt-get install mysql-client libmysqlclient21 root@1:/home/a/Downloads/1111# dpkg-reconfigure mysql-apt-config dpkg-query: package 'mysql-apt-config' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files. /usr/sbin/dpkg-reconfigure: mysql-apt-config is not installed. root@1:/home/a/Downloads/1111# 】

第 10 步: sudo apt-get update

sudo apt-get install mysql-server

sudo service mysql status

要检查刚刚安装的 mysql 版本,请运行以下命令: mysql -V

复制代码
 
相关推荐
是潮汕的灿灿展吖15 分钟前
Centos离线部署nfs操作
linux·运维·centos
Kina_C17 分钟前
Apache HTTP Server 安装、配置与高级功能详解
linux·http·apache
治愈系贝壳23 分钟前
ARM --- day 6 时钟
linux·arm开发·学习
FII工业富联科技服务25 分钟前
从灯塔工厂到AI Factory新模式:AI正在重构制造业的四大核心能力
大数据·运维·人工智能·重构·ar·制造
小五传输26 分钟前
自主可控建设指南:Serv-u替代方案,实现平滑迁移业务不中断
大数据·运维·安全
jun_bai31 分钟前
Orthanc服务器使用java上传dicom影像文件
java·运维·服务器
夜雪一千32 分钟前
MySQL查询条件的顺序是否影响查询效率
数据库·mysql
BullSmall38 分钟前
Anolis OS 8.10 Docker 部署 SonarQube 9.9 完整教程
运维·docker·容器
AAA@峥1 小时前
CentOS7 搭建 ELK 企业级日志集群:从部署到日志可视化完整实战
运维·elk·centos
ZKNOW甄知科技1 小时前
燕千云深度集成飞书:以AI之力,开启无感IT运维体验
大数据·运维·网络·数据库·人工智能·低代码·集成学习