I've got a bash script that runs a series of sql statements:
#!/bin/bash
mysql -u root -p << QUERY_INPUT
CREATE DATABASE dba_first;
CREATE DATABASE dba_second;
CREATE DATABASE dba_third;
GRANT ALL PRIVILEGES ON `dba%`.* TO `dbuser`@`localhost`;
QUERY_INPUT
When I run the script, I get: ./quick.sh: line 20: dba%: command not found
Any suggestions please?
`dba%`backticks not being escaped properly.