我想通过ssh
创建bash别名来运行mysql查询ssh vagrant@192.168.10.10 "mysql wp-theme -e 'DELETE * FROM wp_options where option_name like \'%_transient%\''";
但问题在于我试图逃离\'%_transient%\'
'
我收到了错误
bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
答案 0 :(得分:1)
过了一会儿,我找到了解决方案
ssh vagrant@192.168.10.10 "mysql wp-theme -e 'DELETE FROM \`wp_options\` where \`option_name\` like \"%_transient%\";'"