[轉]debian9 安裝任意版本mysql

來源:互聯網
上載者:User

標籤:too   run   awesome   popup   similar   png   div   orm   nbsp   

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
  • Debian 8 - Install MySQL 5.7
Steps

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

sudo apt updatesudo 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 [email protected] 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/bashcd /tmpwget https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.debsudo 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 updatesudo apt install mysql-community-server -y
References
  • Programster‘s Blog - Debian 8 - Install MySQL 5.6
  • MySQL.com - Download MySQL APT Repository

[轉]debian9 安裝任意版本mysql

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.