Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ERROR 1046 (3D000) at line 29: No database selected ,when I am importing a sql file into mysql.
Posted

1 solution

Well, the error is pretty clear. You need to select the database to apply the query to.
I assume here that you are using MySQL WorkBench and that you have connected to a database using the menu item Database->Connect to Database.

In order to run SQL queries in the script window in MySQL you need to either define the database explicitly like
SQL
SELECT * FROM DataBaseName.TableName

or select the default database.
Usually you do this by double clicking on a database name in the schema navigator.

.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900