Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have following alias and it is working as expected.

alias mysql='LD_LIBRARY_PATH=/usr/local//mysql/lib/:/usr/local//mysql/lib//mysql /usr/local//mysql/bin//mysql'

My question is there are a few other commands like mysqldump , mysqladmin those needs to be linked as well. How to I let the shell prompt know where to look for mysql command without using alias?

This is an issue only on one server where cluster is installed. On all other servers I can type "mysql" or "mysqladmin".

share|improve this question
up vote 2 down vote accepted

Edit the systemwide or userspecific configuration of your system to include the relevant paths in the LD_LIBRARAY_PATH and PATH environment variables.

E.g. for the user-specific variant, put something like

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/:/usr/local/mysql/lib/mysql 
export PATH=$PATH:/usr/local/mysql/bin

into your ~/.profile file.

This will add these directories to the search path for libraries and executable files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.