mysql -h 10.24.xx.xx -u root -p -vvv -s -N -f < test.sql > output 2>&1
测试脚本test.sql
[root@instance-557laxgo ~]# cat test.sql select version(); selects version(); select version();
结果output
[root@instance-557laxgo ~]# cat output -------------- select version() -------------- +------------------------------+ | 5.7.17-baidu-rds-3.0.0.1-log | +------------------------------+ 1 row in set (0.01 sec) -------------- selects version() -------------- ERROR 1064 (42000) at line 2: 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 'selects version()' at line 1 -------------- select version() -------------- +------------------------------+ | 5.7.17-baidu-rds-3.0.0.1-log | +------------------------------+ 1 row in set (0.00 sec) Bye
标签:+------------------------------+,--------------,mysql,version,报错,SQL,test,select From: https://www.cnblogs.com/muzisanshi/p/17044233.html