以下會示範在 Debian, Ubuntu 及 LinuxMint 分別安裝 MySQL 5.7, 5.6, 5.5 的方法。

首先按照需要的安裝的 MySQL 版本, 加入相應的 Repository, 然後用 apt-get 安裝 MySQL:

1+ MySQL 5.7

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.7

2+ MySQL 5.6

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6

3+ MySQL 5.5

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.5

然後就用 apt-get 安裝 MySQL

$ sudo apt-get update
$ sudo apt-get install mysql-server

安裝時 MySQL 會詣問要設置的 root 新密碼, 或者可以執行 mysql_secure_installation 修改:

$ sudo mysql_secure_installation

如果可以連接 MySQL 便安裝完成了, 啟動 MySQL Server:

 sudo service mysql start

接著可以嘗試連接 MySQL, 如果可以成功連接, 那便完成安裝及設置了。

mysql -u root -p

Debian, Ubuntu, LinuxMint 安裝 MySQL 5.7, 5.6, 5.5的更多相关文章

  1. Linux CentOS 7 YUM 安裝 MySQL 5.7

    MySQL YUM 源:http://dev.mysql.com/downloads/repo/yum/ # 下載源 $ wget http://dev.mysql.com/get/mysql57-c ...

  2. 【转载】RHEL / CentOS 7 用 Yum 安裝 MySQL 5.6

    久久未更新... 换好工作出去玩耍了一趟, 现在安装机器啦~ 装一个mysql 到centos 7, 一次转载一篇文章, 记录下: 原文地址:http://www.phpini.com/mysql/r ...

  3. ubuntu phpize 安裝

    php 版本 7.2,所以安裝 php7.2的 sudo apt-get install php7.2-dev 參考 Is is possible to install phpize for PHP7 ...

  4. ubuntu下安裝程序的三個方式

    引言 在ubuntu当中,安装应用程序我所知道的有三种方法,分别是apt-get,dpkg安装deb和make install安装源码包三种.下面针对每一种方法各举例来说明. apt-get方法 使用 ...

  5. ubuntu下安裝sogou拼音

    方法/步骤 打开搜狗输入法Linux版的官网http://pinyin.sogou.com/linux/?r=pinyin,并下载你需要的版本,这里选择64位版. 在Ubuntu14.01下可以直接点 ...

  6. 【linux】安裝 PHP时出现error: Cannot find MySQL header files

    checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket locati ...

  7. 安裝 Rails 開發環境

    安裝 Rails 開發環境 Give someone a program, you frustrate them for a day; teach them how to program, you f ...

  8. Centos7編譯安裝LAMP平臺

    什麽是LAMP? 拆開看 L 就是Linux系統 A是Apache的縮寫 M.P則是MySQL和PHP的简写. 其实就是把Apache, MySQL以及PHP安装在Linux系统上,组成一个环境来运行 ...

  9. centos7 系統vps安裝mysql5.6及設置本地遠程連接筆記

    用xshell連接上vps 1,下载mysql的repo源 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm su ...

随机推荐

  1. Java并发之CyclicBarria的使用(二)

    Java并发之CyclicBarria的使用(二) 一.简介 之前借助于其他大神写过一篇关于CyclicBarria用法的博文,但是内心总是感觉丝丝的愧疚,因为笔者喜欢原创,而不喜欢去转载一些其他的文 ...

  2. CSS3鼠标悬停边框线条动画按钮

    在线演示 本地下载

  3. 《Maven实战》第14章 灵活的构建

    面对不同环境的差异能够灵活的构建项目, 操作系统的差异 开发环境.测试环境.产品环境的差异(最常用) 不同客户的差异 Maven中灵活的构建:属性.资源过滤.profile 14.1Maven属性 6 ...

  4. [洛谷3041]视频游戏的连击Video Game Combos

    题目描述 Bessie is playing a video game! In the game, the three letters 'A', 'B', and 'C' are the only v ...

  5. lastIndexOf 方法 (Array) (JavaScript)

    lastIndexOf 方法 (Array) (JavaScript) 返回指定的值在数组中的最后一个匹配项的索引. 语法         array1.lastIndexOf(searchEleme ...

  6. Android中获取并设置屏幕亮度

    最近在做一个Demo的时候用到了调节屏幕亮度的功能,于是上网搜索了一下,并且写了一个小Demo测试了一下,发现代码还是比较简单的.Android中的亮度调节,主要有三个方向,一个是针对于系统的亮度调节 ...

  7. ZC__问题

    1. int.long.float 等的类型 如何创建 Class对象? ZC: 不能创建的话,反射里面只能使用 Integer等的包装类 作为参数了? ZC: 查了一下,貌似 要用反射创建对象,就不 ...

  8. LeetCode第[16]题(Java):3Sum Closest (和目标值最接近的三个数的和)——Medium

    题目难度:Medium 题目: Given an array S of n integers, find three integers in S such that the sum is closes ...

  9. spring3: AOP 之切面实例化模型 ——跟我学spring3

    所谓切面实例化模型指何时实例化切面. Spring AOP支持AspectJ的singleton.perthis.pertarget实例化模型(目前不支持percflow.percflowbelow ...

  10. 计算从哪天起应该购买预售火车票.cs

    代码直接CSC编译即可. 计算从哪天起应该购买预售火车票.cs using System; using System.Diagnostics; using System.IO; class Progr ...