V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
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 · Nov 27, 2018 · 3097 views
    This topic created in 2711 days ago, the information mentioned may be changed or developed.

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

    3 replies    2018-11-27 21:43:19 +08:00
    barbery
        1
    barbery  
       Nov 27, 2018
    screen 啊
    Les1ie
        2
    Les1ie  
       Nov 27, 2018
    tmux 呀
    aborigine
        3
    aborigine  
       Nov 27, 2018   ❤️ 1
    ctrl+z 挂起到后台,jobs 查看后台的命令,bg %jobnumber 后台继续执行,fg %jobnumber 把命令放前台执行,kill %jobnumber 就是 kill 掉命令
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2457 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 04:14 · PVG 12:14 · LAX 21:14 · JFK 00:14
    ♥ Do have faith in what you're doing.