I have a VPS that we use as our web server, running CentOS 6 / Plesk and I'm trying to setup a script to backup our database. I know I need to use the mysqldump command and set up a cronjob, but I'm struggling to even get the mysqldump running from a command line.
If I SSH into the server as the web user, and try the mysqldump command, I simply get the following error:
/bin/mysqldump: No such file or directory
I can see that mysqldump is not in the users /bin folder so that error makes sense. However, if I echo out my $PATH I get the following:
mysqldump is in the /usr/bin folder, so not sure why it doesn't look there:
-rwxr-xr-x. 1 root root 98272 Feb 12 2014 mysqldump
If I try to run /usr/bin/mysqldump, I still get No Such File or Directory. That doesn't make sense to me - it clearly does exist!
I've also logged in as root and copied (hardlinked) mysqldump to the users /bin folder, but then the user just gets:
mysqldump: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
I can't even get over the first hurdle in backing up my DBs so any pointers from the Experts would be great. I know so little about Linux admin so I'm hoping for a simple solution (aren't we all!) and explanation.