我想把诸如:
mysql
CREATE DATABASE test;
GRANT select,insert,update,delete,create,drop ON test.*
TO user@localhost IDENTIFIED BY 'pwd';
FLUSH PRIVILEGES;
QUIT
写入shell脚本。
我这样写的
#!/bin/sh
mysql
CREATE DATABASE test;
GRANT select,insert,update,delete,create,drop ON test.*
TO user@localhost IDENTIFIED BY 'pwd';
FLUSH PRIVILEGES;
QUIT
--------------
结果就是停在了这里了
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>_______________________________________________
还是需要等待我输入才行
请问怎么才能把sql语句写入shell脚本? |