trying to connect to mysql server through putty and getting mysql command not found

I am trying to connect to mysql server through putty and getting mysql command not found..
All the mysql client utilities are present in the following directory...
/global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin

I log in through putty supplying the user name, password and ip address etc and then trying to access the mysql server at the shell prompt -
hqdb1% mysql -u **** - p -> gives mysql command not found error.
mysql.doc
JsaraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

deisrobinsonCommented:
Is the mysql server actually started?
0
JsaraAuthor Commented:
yes it is up and running and is a live database..
0
deisrobinsonCommented:
Is mysql/bin  or something similar in your environment path?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

deisrobinsonCommented:
If not use this command:
PATH="$PATH:/usr/local/mysql/bin"
0
JsaraAuthor Commented:
I am able to connect to the same server through command prompt fine.
Using putty I am able to log in to the machine but not able to connect to the server. While connecting through putty I am in the bin path - not using any environment path variable.
0
JsaraAuthor Commented:
I don't have rights to set the path variable and all...
0
arnoldCommented:
When you are in the shell, run which mysql.
if it is not found, try /usr/local/bin/mysql or /global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin/mysql
depending on the shell; bash,sh
export PATH=/global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin:$PATH
and mysql should work.
you can add this statement to .bashrc .login .profile.
note the last $PATH is to include the PATH as defined/provided by the system.
0
JsaraAuthor Commented:
ok we are a small shop, I am not a dba basically..
if I type  in /global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin/mysql
it gives me the message - mysql command not found

if I type  in /global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin and enter 'which mysql' then I get the message 'no mysql in /usr/bin

What should I do next.
0
arnoldCommented:
Your PATH variable only incudes /usr/bin

try the following:
PATH=/usr/local/bin:/usr/local/mysql/bin:/global/db/mysql-enterprise-gpl-5.1.39-solaris10-sparc-64bit/bin:/opt/bin:/opt/mysql/bin:/usr/mysql/bin:$PATH
export PATH
now what does running which mysql return?
You should also check with your sysadmin to see whether you are allowed to run mysql.
I do not know how your Solaris setup is.
The sysadmin can quickly update your profile settings to allow for mysql access.
pkginfo | grep -i mysql will check whether mysql is installed as a SUN package.
there is a way using pkginfo -l mysql_packagename | grep mysql to see where the mysql program is installed.  Then add it into the PATH variable as the example above shows.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.