I would like to run a mysql command using a bash script but getting an syntax error because of the accent mark (`).
mysql -u root -p -e "GRANT ALL PRIVILEGES ON `testuser\_%` . * TO 'testuser'@'%';"
Let MySQL users create databases, but allow access to only their own databases
bash: testuser_%: command not found...
Enter password:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '* TO 'testuser'@'%'' at line 1
Looks like a bash confuses this part `testuser\_%`
Any suggestions?