A
A
Alexander2019-06-26 22:42:58
MySQL
Alexander, 2019-06-26 22:42:58

MariaDB how to disconnect from database without leaving mysql?

Hello, I can’t understand how in the terminal when connecting to a database using the use "database" command; Then disconnect from the database, but not exit mysql?
Tried exit and quit but those commands exit mysql. I tried to google, but everywhere only how to connect to the database or delete it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2019-06-26
@AlexMine

use does not connect to anything, but only sets the schema name to be used in the query if it is not explicitly specified.
but if you really want to, then you can google

create database 'non_existing_schema_name';
use non_existing_schema_name;
drop database 'non_existing_schema_name';

for some reason, memory suggests that it’s enough just to make use on a non-existent scheme, but I won’t say it, but I’m too lazy to check.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question