I am trying to run the SQL query with cron periodically but I am having an issue to implement it. I have setup following cron in lightsail SSH using crontab -r
- /opt/bitnami/mysql/bin/mysql /opt/bitnami/apps/joomla/htdocs/remotedb/destination.sh
It always return me following error in email
ERROR 1049 (42000): Unknown database '/opt/bitnami/apps/joomla/htdocs/remotedb/destination.sh'
With SSH if I go to '/opt/bitnami/apps/joomla/htdocs/remotedb/ and then execute the ./destination.sh the queries work fine. It means the DB credentials I am using in the query is fine. something is wrong with the SQL Binary or cron
Please help me to execute the queries in crontab.