Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.