0

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".

Dima Chubarov
  • 2,316
  • 1
  • 17
  • 28
shantanuo
  • 3,579
  • 8
  • 49
  • 66

1 Answers1

2

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.

Sven
  • 98,649
  • 14
  • 180
  • 226