当前位置: 首页 > article >正文

【软件安装】在Ubuntu中安装mysql5.7

参考:cubuntu安装mysql5.6_mob649e81553a70的技术博客_51CTO博客

问题1:sudo apt install mysql-server-5.7 -y 若提示mysql-server 没有可安装候选

答:

sudo nano /etc/apt/sources.list

在开头加入:

#  阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

更新后即可安装:

sudo apt-get update

问题2:安装完成后,mysql -u root -p命令提示Access denied for user 'root'@'localhost'

强行登录

sudo mysql

问题3:如何设置mysql的开机启动

sudo systemctl enable mysql


http://www.kler.cn/a/412933.html

相关文章:

  • LeetCode【代码随想录】刷题(数组篇)
  • 深信服技术服务工程师(网络安全、云计算方向)面试题
  • XX科技面试笔试题
  • 操作系统 内存管理——针对实习面试
  • Python Selenium简介(三)
  • 【微服务】Nacos
  • Scrapy图解工作流程-cnblog
  • 《免费的学习网站推荐3》
  • PostgreSQL中的内存上下文管理
  • 量化交易系统
  • 什么是一份好的技术文档?
  • 【力扣热题100】—— Day2.移动零
  • MySQL解决数据导入导出含有外键的情况
  • Python学习第十三天--面向对象,类和对象
  • 量化交易系统开发-实时行情自动化交易-4.5.1.机器学习策略实现
  • 计算机网络安全实验-使用Kali进行Metasploit操作宿主机摄像头的相关操作步骤
  • 【Jenkins】自动化部署 maven 项目笔记
  • 【Linux运维】关于Linux系统运维基本操作命令
  • Linux入门系列--用户与权限
  • 不用下载安装的线上3D编辑器,支持哪些功能?