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.
also one other thing to note, if you realize you have made an error in your query and you want to go back and fix something enter \c at the prompt and then you will end your query and just go back to the prompt.
You can also terminate the session by issuing an EXIT statement or (under Unix) by typing Ctrl-D. The way you specify connection parameters for mysql also applies to other MySQL programs such as mysqldump and mysqladmin.
To exit from mysql type quit at the mysql> command-prompt.
To quit MySQL Workbench select options File->Exit in a manu at the topmost line of MySQL Workbench window.
ctrl+c will generate SIGINT
, which can be caught or blocked by the application. If you just run killall mysqld
from another terminal, you'll send SIGTERM
to 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 SIGKILL
by hand using kill(1)
; SIGKILL
cannot be caught or blocked, and thus will always terminate a process if the kernel is alive enough to process the signal. Find the pid using pidof
or another mechanism, and run kill -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 bg
and fg
commands 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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With