发布时间:2026/7/7 14:06:24
Ubuntu下MySQL5.7安装步骤 1**、更新软件包列表**apt-get update2**、查看系统默认安装的数据库版本**apt-cache policy mysql-server3**、需要安装mysql5.7的版本就需要换源**养成习惯先备份文件cp /etc/apt/sources.list /etc/apt/sources.list.back然后更换apt源修改sources.list文件vim /etc/apt/sources.list# 阿里源deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse更新 镜像源gpg --keyserver keyserver.ubuntu.com --recv 3B4FE6ACC0B21F32gpg --export --armor 3B4FE6ACC0B21F32 | apt-key add -apt-get update查看默认安装的mysql数据库版本,可以看到默认的已经变成了mysql5.7的版本了4**、安装MySQL并查看是否安装完成**安装过程中需要确认的直接默认点ok进入下一步即可apt-get -y install mysql-server-5.7## 查看mysql是否安装成功dpkg -l | grep mysqlmysql -Vsystemctl status mysql设置开机自启systemctl enable mysql5**、修改服务为全网启动**6**、换回apt源**cd /etc/aptmv sources.list sources.list.oldmv sources.list.back sources.listapt-get update7**、设置允许远程访问**usemysql;updateusersethost%whereuserrootandhostlocalhost;-- 修改root密码为root并授权grantallprivilegeson*.*toroot%identifiedbyrootwithgrantoption;flushprivileges;转至https://blog.csdn.net/trisyp/article/details/141860593

相关新闻

2026/7/7 12:31:05

PIC18F46K20与MC74HC165A实现GPIO扩展方案

1. 为什么需要输入扩展方案在嵌入式系统开发中,我们经常会遇到一个经典矛盾:微控制器的GPIO引脚数量有限,但实际项目需要监测的输入信号却很多。以PIC18F46K20为例,这款40引脚封装的MCU虽然功能强大,但除去电源、晶振、…

2026/7/8 0:36:30

7天从零到精通:SMAPI星露谷物语模组开发完全指南

7天从零到精通:SMAPI星露谷物语模组开发完全指南 【免费下载链接】SMAPI The modding API for Stardew Valley. 项目地址: https://gitcode.com/gh_mirrors/smap/SMAPI 你是否曾想过为星露谷物语添加全新的游戏内容?是否羡慕其他玩家拥有独特的农…

2026/7/8 0:36:30

XML Notepad终极指南:3步掌握微软官方免费XML编辑器

XML Notepad终极指南:3步掌握微软官方免费XML编辑器 【免费下载链接】XmlNotepad XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents. 项目地址: https://gitcode.com/gh_mirrors/xm/XmlNotepad XML Notepad是…

2026/7/8 0:36:30

工业级负载控制方案:TPD2015FN与STM32F100ZE应用指南

1. 项目概述:工业级负载控制方案设计 在工业自动化、电力电子和机电控制领域,精确控制电感和电阻负载是一项基础但关键的技术需求。TPD2015FN作为东芝半导体推出的8通道高端智能功率开关IC,与STM32F100ZE这款ARM Cortex-M3内核的工业级MCU组合…

2026/7/7 1:15:40

国内大模型选型与企业级落地实战指南

我不能提供任何关于访问境外网络信息的技术方案或变通方法。根据中国法律法规和网络管理要求,所有互联网服务必须遵守国家关于网络安全、数据安全和内容安全的规定。ChatGPT及其后续版本(如所谓“GPT-5”)是由境外机构研发的大语言模型&#…

2026/7/7 1:17:48

三步实战方案:高效获取智慧教育平台电子课本PDF的完整流程

三步实战方案:高效获取智慧教育平台电子课本PDF的完整流程 【免费下载链接】tchMaterial-parser 国家中小学智慧教育平台 电子课本下载工具,帮助您从智慧教育平台中获取电子课本的 PDF 文件网址并进行下载,让您更方便地获取课本内容。 项目…

2026/7/8 0:36:30

工业级负载控制方案:TPD2015FN与STM32F100ZE应用指南

1. 项目概述:工业级负载控制方案设计 在工业自动化、电力电子和机电控制领域,精确控制电感和电阻负载是一项基础但关键的技术需求。TPD2015FN作为东芝半导体推出的8通道高端智能功率开关IC,与STM32F100ZE这款ARM Cortex-M3内核的工业级MCU组合…

2026/7/8 0:36:30

XML Notepad终极指南:3步掌握微软官方免费XML编辑器

XML Notepad终极指南:3步掌握微软官方免费XML编辑器 【免费下载链接】XmlNotepad XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents. 项目地址: https://gitcode.com/gh_mirrors/xm/XmlNotepad XML Notepad是…

2026/7/7 4:23:48

3个高效策略:快速掌握Axure中文界面配置

3个高效策略:快速掌握Axure中文界面配置 【免费下载链接】axure-cn Chinese language file for Axure RP. Axure RP 简体中文语言包。支持 Axure 11、10、9。不定期更新。 项目地址: https://gitcode.com/gh_mirrors/ax/axure-cn 还在为Axure RP的英文界面感…