有一些东西是 Bash 不喜欢的。应该逃避什么以及如何逃避?
mysql --user=root --password=mypass vsftpd << EOF
GRANT ALL PRIVILEGES ON `MYUSERNAME\_%`.* TO 'MYUSERNAME'@'%';"
EOF
我收到以下错误:
-bash: MYUSERNAME_%: command not found
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* TO 'MYUSERNAME'@'%'' at line 1