
推荐《mysql教程》
创建alias
alias db='mysql -hlocalhost -uroot -p123456'
登入後複製
创建mysql语句的执行文件: mysql.txt
select * from test_db.test_table
登入後複製
在Linux命令行中输入
$ db < /path/to/mysql.txt | cat > store.log
登入後複製
最终store.log
中的数据即是select * from db.table
的结果。
太好用了!
更多编程相关内容,请关注php中文网编程入门栏目!