how to execute program without using ./ or sh

Hi,

I am a complete newbie for unix. I have just installed mysql on my MAC. I was wondering every time I wanted to use mysql I had to ./mysql or sh mysql everytime on /usr/local/bin/mysql/bin. How can I execute the mysql program without using ./ or sh. I chmod +x already. And what do I have to do to execute mysql from all path, right now I had to go to /usr/local/mysql/bin every time to execute the program. Thank you very much.

Add the path where mysql bin is available to your $PATH var
That should be in your resource file in home directory.

Add it something like

PATH=$PATH:/this/is/the/path/where/mysql/is/there:

Thank you very much. I know I sound like a newbie, but you have just saved my life.

Everybody is a newbie when starting, don't worry about that.
Follow the forum regularly you will learn a lot here - many contributors here are live examples for that ! :slight_smile: :b: