I just got in touch with mysql and created a user yeyadmin, but didn't create a database for it. after a few days, I want to delete this user and run DELETEFROMuserWHEREUser & quot; yeyadmin & quot; andHost & quot; localhost & quot; system Display: ERROR1046 (3D000): Nodatabaseselected. The system is a virtual machine version of VM11, Ubuntu14.04 server version, and Mysql is installed online with the apt-get command. I checked several mysql instances.
I just got in touch with mysql and created a user yeyadmin, but didn't create a database for it. I want to delete this user several days later, run the delete from user WHERE User = "yeyadmin" and Host = "localhost" command. The system displays ERROR 1046 (3D000): No database selected. The system is a virtual machine VM version 11, Ubuntu 14.04 server version, and Mysql is installed online using the apt-get command. I checked several commands for deleting users on the web pages: mysql> DELETE FROM user WHERE User = "Username" and Host = "localhost ";
Mysql> flush privileges;
Mysql> drop database DBname;
I am worried that I did not create a database for this user. I created another database, yeytest, and granted all permissions to yeyadmin. Type delete from user ...... ERROR 1046 (3D000): No database selected will still be reported. continue to enter the following two commands and check the database and user again. we found that the yeytest database was deleted, however, the user yeyadmin is still there.
Thank you very much for your answers.