By chance, I received a response. Not a command or instruction.
CREATE DATABASE UnselectingDB; USE UnselectingDB; DROP DATABASE UnselectingDB;
Best wishes,
You can check this with (know what the selected database is)
SELECT DATABASE();
Step by step ...
mysql -u root -pXXXX<ENTER>
At this step you can verify that you do not have the selected database, the answer is NULL
SELECT DATABASE();
Now you can select any database and perform your operations
USE mysql;
You can check which database is selected, for this example - mysql
SELECT DATABASE();
Now we need to create another database, and not delete the useful one.
CREATE DATABASE StopUsingAnyDB;
Later we need to select a newly created database.
USE StopUsingAnyDB;
You can check which database is selected, for this example StopUsingAnyDB
SELECT DATABASE();
The last one. We delete the selected database
DROP DATABASE UnselectingDB;
You can check which database is selected, for this example NULL again.
SELECT DATABASE();
Anita source share