V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
DongDongXie
V2EX  ›  MySQL

如何挂起正在执行的 sql 查询到后台

  •  
  •   DongDongXie · 2018-11-27 20:58:40 +08:00 · 2624 次点击
    这是一个创建于 1948 天前的主题,其中的信息可能已经有所发展或是发生改变。

    RT,终端 hive 下执行一个查询语句,可能执行时间很长,如果 Ctrl+C 的话,但是已经执行一段时间了,不想重新执行,有没有办法让其在后台进行,达到 nohup 的效果,我是直接执行的 hive 语句,没有写成脚本执行。。。

    3 条回复    2018-11-27 21:43:19 +08:00
    barbery
        1
    barbery  
       2018-11-27 21:01:49 +08:00
    screen 啊
    Les1ie
        2
    Les1ie  
       2018-11-27 21:04:43 +08:00
    tmux 呀
    aborigine
        3
    aborigine  
       2018-11-27 21:43:19 +08:00   ❤️ 1
    ctrl+z 挂起到后台,jobs 查看后台的命令,bg %jobnumber 后台继续执行,fg %jobnumber 把命令放前台执行,kill %jobnumber 就是 kill 掉命令
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1189 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 18:26 · PVG 02:26 · LAX 11:26 · JFK 14:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.