13

i use linux ubuntu..i try to copy db and type some mysqldump command.. but at terminal show:

The program 'mysqldump' can be found in the following packages:
 * mysql-client-5.0
 * mysql-client-5.1
Try: sudo apt-get install <selected package>
bash: mysqldump: command not found

how to get mysqldump for my pc? i've tried to follow the instruction,but show like below:

Err http://ubuntu-ashisuto.ubuntulinux.jp jaunty/main libnet-daemon-perl 0.43-1
  Could not connect to ubuntu-ashisuto.ubuntulinux.jp:80 (122.216.218.146), connection timed out
klox
  • 531
  • 4
  • 9
  • 16

4 Answers4

20

How about ... doing what was printed on the terminal?

% sudo apt-get install mysql-client-5.1

or

% sudo apt-get install mysql-client-5.0

(pick the right version based on whats installed on your machine)

akira
  • 61,009
  • 17
  • 135
  • 165
11

For CentOS, RedHat and Fedora install:

sudo yum install mysql
joelschmid
  • 269
  • 4
  • 7
  • 1
    Do you know if this installs the server as well as the client binaries? – slim Jun 15 '18 at 16:48
  • 4
    Apparently the package in yum for the server is `sudo yum install mysql-server`. `sudo yum install mysql` is fine for client. – Gonzalo Aug 08 '18 at 09:21
0

Install the mysql client package.

In a terminal try the command sudo apt-get install mysql-client-5.1

(I would have thought that the message you got was clear enough, really.)

Neal
  • 8,748
  • 1
  • 28
  • 33
0

Looks like you need to change the mirror ( repository) . Follow the steps mentioned in this tutorial. After changing it , you can use the commands mentioned by @Akira

ukanth
  • 10,660
  • 11
  • 43
  • 60
  • show "No suitable download server was found". – klox Jul 20 '10 at 08:59
  • check your source file which is located at /etc/apt/sources.list and follow this tutorial, if you dont find any mirror under that file. https://help.ubuntu.com/community/Repositories?action=show&redirect=AddingRepositoriesHowto – ukanth Jul 20 '10 at 10:25