Debian 9 - Install MySQL Server

The steps below will show you how to install whichever version of MySQL-server you want on your Debian 9 server and why you should not just run sudo apt install mysql-server -y

Similar Posts

Steps

Usually, to install MySQL on a distro, you would just perform the following commands:

sudo apt update
sudo apt install mysql-server -y

You would then receive either MySQL 5.5, 5.6, or 5.7 depending on which distro you were using, but they were all versions of MySQL. However, with Debian 9, if you do this you will end up installing MariaDB 10.1 which is a drop in replacement for 5.6.

If you decide to just go with MariaDB 10.1 and are confused by the lack of a prompt to set the root password, just login with sudo mysql and then use mysql command to set the password: GRANT ALL ON *.* TO root@localhost identified by 'myawesomepassword';

Install MySQL 5.6, 5.7, or 5.8-preview

If you really want MySQL instead of MariaDB for whatever reason, you can execute the script below to install the version you want.

#!/bin/bash
cd /tmp
wget https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb
sudo dpkg -i mysql-apt-config_*.deb

At the popup-page, select the version you want.

Then use the following commands to install the MySQL server (it will install the version you selected).

sudo apt update
sudo apt install mysql-community-server -y

References

[转]debian9 安装任意版本mysql的更多相关文章

  1. Windows7 64位安装最新版本MySQL服务器

    Windows7 64位安装最新版本MySQL服务器 近期,一直在研究MySQL数据库,经常修改配置文件,导致MySQL数据库无法使用,不得不反复重装MySQL数据库.以下是在Windows7 64位 ...

  2. yum安装高版本mysql(5.5)

    1.导入第三方源webtatic rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm 2.如果已安装低版本的mysql就删除 yum r ...

  3. linux yum安装指定版本mysql

    1.下载mysql rpm包 cd /usr/local/src wget https://dev.mysql.com/get/mysql80-community-release-el7-.noarc ...

  4. ROS中安装任意版本的OPENCV

    转自:http://tieba.baidu.com/p/5023000237 安装 Opencv 3.2 on Ubuntu 16.04 并创建node测试 step 1: 安装一些package s ...

  5. LINUX下编译安装最新版本mysql

    通过参考其他文章 1.下载安装mysql-5.5.30.tar.gz与cmake.2.8.11.2.tar.gz (1)先安装cmake(mysql5.5以后是通过cmake来编译的) [root@ ...

  6. Linux安装任意版本的dotnet环境

    下载地址 https://www.microsoft.com/net/download/dotnet-core/2.1 安装符合服务器CPU架构的二进制包. 如果架构不对,会出现一下错误: -bash ...

  7. debian9安装mysql

    cd /tmp wget https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb dpkg -i mysql-apt-config_*.d ...

  8. 如何使用 Yum Repository 安装指定版本的 MySQL

    自从从使用 debian 系的 apt-get 转到使用 yum 工具之后一直不是很习惯,也没有去看过很多工具包安装的时候到底影响到了哪些文件等.这次借这次社区版 MySQL 安装来一并梳理一下. 首 ...

  9. centos7 安装gitlab任意版本

    主要还是根据官网:https://www.gitlab.cc/installation/#centos-7 1.安装依赖: sudo yum install curl policycoreutils ...

随机推荐

  1. 定义java中的变量

    四种类型 1.整数 2.小数 3.字符 4.布尔值 八种 整数(byte   字节1   范围-128~127 )    (short   字节 2)    (int    字节4)     (lon ...

  2. pip更换国内源

    学习Python开发,据说pip是很好用的一个Python包管理工具,于是尝试使用,但源异常慢,于是切换至国内的源(清华源). 在~/.pip/pip.conf (如果没有此文件则自行新建) 内容 [ ...

  3. file 上传大小限制问题

    今天突然传了一张很大的图片 结果怎么传都获取不到信息(如下); 最后查看了下php.ini 中的 " upload_max_filesize  "最大只允许了2M!  改下就可以 ...

  4. Android逆向之smali

    Android逆向之smali 头信息 smail文件前三行 .class <访问权限> [关键修饰字] <类名>; .super <父类名>; .source & ...

  5. 【转】B树、B+树、B*树

    出处:http://blog.csdn.net/v_JULY_v 1.前言: 动态查找树主要有:二叉查找树(Binary Search Tree),平衡二叉查找树(Balanced Binary Se ...

  6. 【repost】JavaScript 基本语法

    JavaScript 基本语法,JavaScript 引用类型, JavaScript 面向对象程序设计.函数表达式和异步编程 三篇笔记是对<JavaScript 高级程序设计>和 < ...

  7. SQL STUFF函数 拼接字符串 多列 合并成一列 转

    关于和并列的 要这种效果. create table tb(idint, value varchar(10)) insert into tbvalues(1,'aa') insert into tbv ...

  8. 深入理解java虚拟机一之走进Java

    Java技术体系 Java程序设计语言.Java虚拟机.Java API类库统称为JDK Java API类库中Java SE API子集和Java虚拟机统称为JRE Java发展史 1991年4月 ...

  9. R-CNN,SPP-NET, Fast-R-CNN,Faster-R-CNN, YOLO, SSD系列深度学习检测方法梳理

    1. R-CNN:Rich feature hierarchies for accurate object detection and semantic segmentation 技术路线:selec ...

  10. Java 实现删除文件工具类

    工具代码 package com.wangbo; import java.io.File; /** * 删除目录或文件工具类 * @author wangbo * @date 2017-04-11 1 ...