I’m using Ubuntu Natty.
I ran mysqld from the command line using the following:
mysqld -ndbcluster --console -umysql
To which I get the following:
120314 0:09:49 [Warning] option 'new': boolean value 'dbcluster' wasn't recognized. Set to OFF.
120314 0:09:49 [Note] Plugin 'ndbcluster' is disabled.
120314 0:09:49 [Note] Plugin 'FEDERATED' is disabled.
120314 0:09:50 InnoDB: The InnoDB memory heap is disabled
120314 0:09:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120314 0:09:50 InnoDB: Compressed tables use zlib 1.2.3
120314 0:09:50 InnoDB: Using Linux native AIO
120314 0:09:50 InnoDB: Initializing buffer pool, size = 128.0M
120314 0:09:50 InnoDB: Completed initialization of buffer pool
120314 0:09:50 InnoDB: highest supported file format is Barracuda.
120314 0:09:50 InnoDB: Waiting for the background threads to start
120314 0:09:51 InnoDB: 1.1.8 started; log sequence number 1595675
120314 0:09:51 [Note] Event Scheduler: Loaded 0 events
120314 0:09:51 [Note] mysqld: ready for connections.
Version: '5.5.19-ndb-7.2.4-gpl-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Cluster Community Server (GPL)
However, I can’t seem to figure out how to terminate the session. I’ve tried Control-C and a host of other combinations.
How do I end the session and go back to the command prompt?!
Thanks.
ctrl+c will generate
SIGINT, which can be caught or blocked by the application. If you just runkillall mysqldfrom another terminal, you’ll sendSIGTERMto the process, which can also be caught or blocked, but will give a much stronger hint that the process should terminate immediately. (Which will be nice for cleanly closing database tables.)Ctrl+</kbd> will generate
SIGQUIT, which can be caught or blocked by the application. (If the application doesn't catch or block this signal, the OS will generate a core file for you.)You can send a
SIGKILLby hand usingkill(1);SIGKILLcannot be caught or blocked, and thus will always terminate a process if the kernel is alive enough to process the signal. Find the pid usingpidofor another mechanism, and runkill -SIGKILL pid. Note that this is a rough death; the process is not given a chance to clean up after itself, so database tables may be left in an inconsistent state that may require some time to repair on the next start.If you just want a prompt back, you can use ctrl+z to suspend the process. You can then use your shell’s
bgandfgcommands to allow the process to continue running in the background, or re-join the process in the foreground. (That terminology is non-sense, but I hope it conveys the idea.)