What is wrong with the rsh?

using rsh
i try to run the following command:
rsh -l user_of_the_host host_ip_address "mysql -uroot"
(the mysql has been installed on the target host
under the path :/usr/local/mysql)
but get the error prompt :
-bash:command not found mysql

Two different versions of unix created rsh at about the same time, but they are very different.
BSD rsh is remote shell
USG rsh is restricted shell

Modern OS's try to support both of these and you probably have the wrong one. Use remsh instead. It should always be the BSD rsh.

And I guess I need to add the traditional remsh lecture... remsh has terrible security and you should switch to ssh. yada yada yada

The other problem is the PATH. rsh does not use the remote user's .profile (or .bash_profile). If you know the full path to mysql, use it. Even then, there may be a library problem if it's not installed in the default path. In that case, you can do something like:

rsh -l user  env LD_LIBRARY_PATH=...  PATH=.... mysql  ....

Where ... is what you fill in.