MySQL 在 Ubuntu 14.04 上安装 mysqldump

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41828862/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 22:09:32  来源:igfitidea点击:

Install mysqldump on Ubuntu 14.04

mysqlubuntu

提问by patman

I have trouble installing the mysqldump utility on a Ubuntu Server. I tried with apt-get install mysqldumpbut i get E: Unable to locate package mysqldump.

我在 Ubuntu 服务器上安装 mysqldump 实用程序时遇到问题。我试过了,apt-get install mysqldump但我得到了E: Unable to locate package mysqldump

I tried googling but couldn't find any quality information of the installation of mysqldump. I stumbled upon packages like mysql-client-5.1or thelike that might contain it.

我尝试使用谷歌搜索但找不到安装 mysqldump 的任何质量信息。我偶然发现了mysql-client-5.1可能包含它的类似或类似的包。

But i am afraid it might somehow clash with the existing mysql installation. As i am no expert to the topic i wasn't able to gain enough information on the client packages, what they contain and if they will interfere. Can somebody help me find the right package and is it on top of mysql so it won't interfere with the current installation?

但我担心它可能会以某种方式与现有的 mysql 安装发生冲突。由于我不是该主题的专家,因此我无法获得有关客户端包、它们包含的内容以及它们是否会干扰的足够信息。有人能帮我找到合适的包吗,它是否在 mysql 之上,所以它不会干扰当前的安装?

回答by Kevin Sadler

mysqldump is part of the package mysql-client and can be installed with:

mysqldump 是 mysql-client 包的一部分,可以通过以下方式安装:

sudo apt-get install mysql-client

This will install the default version, often there are packages for other MySQL versions, e.g. mysql-client-5.5. The generic version should be suitable in most cases.

这将安装默认版本,通常有其他 MySQL 版本的包,例如 mysql-client-5.5。通用版本应该适用于大多数情况。

回答by Impermanence

sometimes apt-get wont get you the latest version, go to mysql site and download/unpack the mysql-community-client_..*-1ubuntu16.04_i386.deb to get the mysqldump of the version you want. For example : mysql-community-client_5.7.26-1ubuntu16.04_i386.deb

有时 apt-get 不会为您提供最新版本,请访问 mysql 站点并下载/解压 mysql-community-client_ .*-1ubuntu16.04_i386.deb 获取你想要的版本的 mysqldump。例如:mysql-community-client_5.7.26-1ubuntu16.04_i386.deb