Installed MySQL but still says command not found

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


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