mysqloptimize: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/mysqloptimize - from package: mariadb-client-10.0
/usr/bin/mysqloptimize - from package: mysql-client-5.5

You may install the required package with command apt-get install {package}
Error in other languages:
mysqloptimize: bevel nie gevind nie
mysqloptimize: comandă negăsită
mysqloptimize: comando não encontrado
mysqloptimize: commande introuvable
mysqloptimize: command not found
mysqloptimize: käsku ei ole
mysqloptimize: không tìm thấy lệnh
mysqloptimize: komanda nerasta
mysqloptimize: Kommando nicht gefunden.
mysqloptimize: kommandot finns inte
mysqloptimize: komut yok
mysqloptimize: nie znaleziono polecenia
mysqloptimize: níor aimsíodh an t-ordú
mysqloptimize: no se encontró la orden
mysqloptimize: no s'ha trobat l'ordre
mysqloptimize: opdracht niet gevonden
mysqloptimize: parancs nem található
mysqloptimize: perintah tidak ditemukan
mysqloptimize: príkaz nenájdený
mysqloptimize: příkaz nenalezen
mysqloptimize: команда не найдена
mysqloptimize: командата не е открита
mysqloptimize: 命令找不到
mysqloptimize: コマンドが見つかりません