Reputation: 129
I run this command via ssh:
mysql --defaults-extra-file=/login.cnf database < /test.sql
/test.sql contents:
SELECT 1;
SELECT 1234;
I get this response:
[root@testvps ~]# mysql --defaults-extra-file=/login.cnf database < /test.sql
1
1
1234
1234
Why there is double results? I expect the response should be:
1
1234
Does it mean that each SELECT query were executed twice?
MySQL version that I am using is mysql Ver 14.14 Distrib 5.7.11, for Linux (x86_64) using EditLine wrapper
Thank you in advance for all the answers! :)
Upvotes: 0
Views: 184
Reputation: 4642
That's because there is the column name and the corresponding value.
The answer format is the following:
+--------+
| Column |
+--------+
| Value |
+--------+
Upvotes: 3