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:
- [Solved] MYSQL ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot e…
- MySQL import file prompt — secure file priv option problem
- MySQL database insert into statement with parameters Error
- EnvironmentError: mysql_config not found
- The jdbc driver imported from idea into MySQL appears “Java. Lang. classnotfoundexception: com. Mysql. CJ. JDBC. Driver”
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- Logstash output jdbc Error: java.lang.IllegalAccessError: tried to access class com.mysql.jdbc.EscapeProcessor from class com.mysql.jdbc.ConnectionImpl
- Unknown system variable ‘storage_engine’
- When installing MySQL database on Mac OS, the system prompts MySQL: command not found
- ERROR 1044 (42000): Access denied for user ‘root’@’localhost’ to database ‘in…