I am attempting to write a shell script that executes a query on a mysql database. It seems to run fine in the mysql panel, but not in the script.
The code is:
mysql -u username -ppassword -e 'delete from table where forumid = 25 and replace (title, ' ', '') like '%word%'';
When I run this script I get this error: Access denied for username@localhost to database ' , ) like %word%'
Any idea what is causing this error?
Thanks