我在ubuntu 14.04中使用以下命令安装了 MySQL
apt-get install mysql-server
现在检查版本,它会自动安装最新版本
mysql --version
展示
mysql Ver 14.14 Distrib 5.7.18,适用于使用 EditLine 包装器的 Linux (x86_64)
但我需要安装MySQL 5.7.17的确切版本,所以尝试运行
apt-get install mysql-client-5.7.17 mysql-client-core-5.7.17
但它给出了如下错误
Reading state information... Done
E: Unable to locate package-client-5.7.17
E: Couldn't find any package by regex-client-5.7.17'
E: Unable to locate package mysql-client-core-5.7.17
E: Couldn't find any package by regex 'mysql-client-core-5.7.17'
mysql-client
我怎样才能做到这一点,我需要分别安装mysql-server
吗?
编辑
还尝试使用wget下载特定版本
wget https://dev.mysql.com/downloads/gpg/?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb
但它没有下载;查看终端输出
--2017-06-05 11:19:29-- https://dev.mysql.com/downloads/gpg/?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb.1’
[ <=> ] 16,416 28.3KB/s in 0.6s
2017-06-05 11:19:31 (28.3 KB/s) - ‘index.html?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb.1’ saved [16416]
在这里我是如何解决这个问题的
从系统中删除所有 MySQL 实例
现在从MySQL 存档下载下面的 .deb 文件
├── mysql-client_5.7.17-1ubuntu14.04_amd64.deb
├── mysql-common_5.7.17-1ubuntu14.04_amd64.deb
├── mysql-community-client_5.7.17-1ubuntu14.04_amd64.deb
├── mysql-community -server_5.7.17-1ubuntu14.04_amd64.deb
├── mysql-server_5.7.17-1ubuntu14.04_amd64.deb
├── mysql-server_5.7.17-1ubuntu14.04_amd64.deb-bundle.tar
└── mysql-testsuite_5.7.17 -1ubuntu14.04_amd64.deb
按以下顺序安装它们
注意:
libmecab2
如果在安装上述软件包时出现任何错误,请安装这将提示为 mysql 设置 root 密码;随心所欲地设置
现在检查
mysql-version
mysql Ver 14.14 Distrib 5.7.17,适用于使用 EditLine 包装器的 Linux (x86_64)
参考链接