以下會示範在 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. Powerdesiger使用技巧

    1.问题:使用CDM在生成LDM文件时,每次都生成Name(LDM)1,Name(LDM)2这样 , 同时遇到一个莫名其妙的问题,就是LDM或者PDM生成到了整个工程外的目录下 疑问回答:是因为原有的 ...

  2. java注解1

    http://computerdragon.blog.51cto.com/6235984/1210969 http://blog.csdn.net/it_man/article/details/440 ...

  3. SQL语句2

    1. SELECT * FROM Persons WHERE City NOT LIKE '%lon%' 2. SELECT * FROM Persons WHERE FirstName LIKE ' ...

  4. Qt5.5.1移植到freescale imx6

    一.环境 HOST:ubuntu12.04-LTS Embedded:freescale imx6 linux-3.0.35 CROSS_COMPILE:freescale提供的gcc-4.6.2-g ...

  5. How to create a notification with NotificationCompat.Builder?AAAA

    Ask Question up vote 49 down vote favorite 19 I need to create a simple notification which will be s ...

  6. centos 7 install virtualbox

    from:https://wiki.centos.org/HowTos/Virtualization/VirtualBox Installing VirtualBox cd /etc/yum.repo ...

  7. viewport大白话

    以下所有内容均是我自己理解的,可能有误,懂得大佬希望指点一下我.. 首先,写一个简单的页面.里面只有1个200*200的div <html lang="en"> < ...

  8. pbs "ll: command not found"

    可以用  ls -ltr   替代 ll

  9. Android中Fragment的Hide和Show

    我们都知道,Fragment动态添加的时候我们可以使用FragmentTransaction的add和replace方法,replace方法就等效于对这个Fragment先执行remove(),再执行 ...

  10. hdu 2126 Buy the souvenirs 二维01背包方案总数

    Buy the souvenirs Time Limit: 10000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Other ...