D
D
Daniel2018-02-27 22:34:41
MySQL
Daniel, 2018-02-27 22:34:41

MYSQL does not execute commands, but simply translates \C lines - does not help?

How to exit a session in cmd when mysql has blocked the whole process and is not executing commands. The only thing that performs and then is not correct USE. It just translates the line,
and nothing helps, all the combos are squeezed

mysql> use statistic;
ERROR 1049 (42000): Unknown database 'statistic;'
mysql> show databases;   -- где это я сейчас?
    -> '    -- почему не выполнилась
    '> fgf
    '> "
    '> ;
    '> ^C
mysql> show databases;
    ->   -- куда он пошел, где результ.
    -> use statistic;
    -> ^C
mysql> ^C
mysql> ^C -- и ни как не выйти

And how do I exit the console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-02-27
@daniil14056

Judging by the behavior, earlier (or somewhere in the configs) you replaced the command delimiter.
use databasename doesn't require a delimiter, so it worked the first time.
Flushing the input buffer is \c (except inside quotes - close quotes first). Either ctrl+C, but it depends on how the mysql client is built.
Command separator replacement - \d new_separator or delimiter new_separator

mysql> \d $$
mysql> use test2
ERROR 1049 (42000): Unknown database 'test2'
mysql> show tables;
    -> wtf?
    -> \c
mysql> \d ;
mysql> show tables;
+----------------------------------+
| Tables_in_test                   |
+----------------------------------+

The most common way to exit most interactive text applications is ctrl+D, which sends EOF.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question