Installed MySQL but still says command not found

I downloaded MySQL's rpm bundle from the site, converted it to a .deb file using alien and installed it by saying sudo dpkg -i mysql-server_5.6.14-2_amd64.deb. However, when I say mysql in the command line, it gives an error that it is not installed. What do I do?

I am on Ubuntu GNOME 13.10 64-bit

1

4 Answers

Run this command on terminal

sudo apt-get install mysql-client

After install MySQL client you can use 'mysql' command. If you want to install MySQL server you have to run following command.

sudo apt-get install mysql-server

0

If it didn't work, please try:

sudo apt-get install mariadb-client

That worked for me.

Found:E: Package 'mysql-client' has no installation candidate

Credits to user Yuan-Chen Ho

Why are you installing an .rpm file? To install MySQL on Ubuntu, just, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install mysql-server
3

The mysql server package doesn't provide a "client"-like binary, but the mysqld daemon. If you want to send orders to any mysql server you need to install the client side of mysql which is in another package, the mysql-client.

Also, there is no need to manually downloading the deb file. This could lead to broken dependencies. If the package is in the repositories a simple:

sudo apt-get install mysql-client

should suffice.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like