Ubuntu 16.04 使用 *.deb 安装 MySQL 5.7

date: 2017-07-03

使用 *.dev 包安装 MySQL 5.7

特点:方便快捷

0,系统版本:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial

1,官网下载软件包

在此地址选择适合相应系统版本的软件包 https://dev.mysql.com/downloads/mysql/

找到后,可使用 wget 下载:

wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar

2,安装依赖:

libaio1 libmecab2

查找版本及下载安装:

apt-cache search libaio
apt-get install libaio1

apt-cache search libmecab
sudo apt-get install libmecab2

3,解压

shell> tar -xvf mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar

4,预配置(按要求配置 root 密码)

shell> sudo dpkg-preconfigure mysql-community-server_*.deb

5,安装(如果报错,根据提示安装对应的依赖包)

shell> sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb

6,If you are being warned of unmet dependencies by dpkg, you can fix them using apt-get:

sudo apt-get -f install

7,安装的文件:

All configuration files (like my.cnf) are under /etc/mysql

All binaries, libraries, headers, etc., are under /usr/bin and /usr/sbin

The data directory is /var/lib/mysql

参考:https://dev.mysql.com/doc/refman/5.7/en/linux-installation-debian.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容