晚上好
我试图在脚本中将数据从一个表插入到另一个表中,但却发现数据库未找到--我做错了什么吗?
mysql -e INSERT INTO mysql.db SELECT * from "$cpuser"_mysql.db;
CPUser是在脚本前面手动分配的变量。
在CLI中,我可以从两个选项中选择 *
注解输出;
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 ''domain7mysql4'_mysql.db' at line 1
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 ''domain7mysql4'_mysql.user' at line 1
1条答案
按热度按时间jchrr9hc1#
-se需要字符串,因此您需要提供一个字符串
或
如果没有保留文本