source mysql_test.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
'RROR 1102 (42000): Incorrect database name '
bash: show: command not found...
: command not found...
bash: use: command not found...
: command not found...
-bash: mysql_test.sql: line 5: syntax error near unexpected token `from'
'bash: mysql_test.sql: line 5: `select host,user,authentication_string from user;
脚本内容:
mysql -u root -pXXXXXXX
show databases;
use mysql;
select host,user,authentication_string from user;
show global variables like '%timeout%';
select version();
show variables;
show status;
show table status \G;
netstat -lnpt | grep 3306
cat .mysql_history
cat /etc/my.cnf
进入mysql后逐条执行可以(后三条在系统下执行)。为什么source sql文件就报乱七八糟的错误呢?
收起