# how to execute program without using ./ or sh

**URL:** <https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [January 22, 2010, 7:06am UTC](https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052 "2010-01-22T07:06:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noppanit](https://community.unix.com/letter_avatar/noppanit/32/5_5575768a8748004e209b776fc1b2916d.png) [@noppanit](https://community.unix.com/u/noppanit)\
**Post date:** [January 22, 2010, 7:06am UTC](https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052/1 "2010-01-22T07:06:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matrixmadhan](https://community.unix.com/letter_avatar/matrixmadhan/32/5_5575768a8748004e209b776fc1b2916d.png) [@matrixmadhan](https://community.unix.com/u/matrixmadhan)\
**Post date:** [January 22, 2010, 7:16am UTC](https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052/2 "2010-01-22T07:16:14Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![noppanit](https://community.unix.com/letter_avatar/noppanit/32/5_5575768a8748004e209b776fc1b2916d.png) [@noppanit](https://community.unix.com/u/noppanit)\
**Post date:** [January 22, 2010, 7:18am UTC](https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052/3 "2010-01-22T07:18:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matrixmadhan](https://community.unix.com/letter_avatar/matrixmadhan/32/5_5575768a8748004e209b776fc1b2916d.png) [@matrixmadhan](https://community.unix.com/u/matrixmadhan)\
**Post date:** [January 22, 2010, 7:23am UTC](https://community.unix.com/t/how-to-execute-program-without-using-or-sh/258052/4 "2010-01-22T07:23:01Z")

</div>

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 ! 🙂 :b:
