Error 1046 (3d000): no database selected) error in importing MySQL datagram from Ubuntu 18.04

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

The error message is as follows:

ERROR 1046 (3D000): No database selected

There are two reasons for the error

1. Before importing the database, there is no such database in the database

Solution: create a new database with the name of the database you want to import, select the database, and then import it

The input command and running results are as follows:

  

mysql> use mydb
mysql> source /root/mydb.sql

2. The location of the SQL to be imported is not correct 2

Solution: check the path of your SQL file to modify it

  

Similar Posts: