No database selected. MySQL Query Browser

2.3k Views Asked by At

I am using MySQL Query Browser 1.2.17. My problem is that using EXACTLY the same query sometimes I get No database selected error.

I tried to find any dependence in using USE database; or FROM database.table.

I have no idea when will I get an error and when I won't and if I get I don't know how to solve this (since there is in the query USE database;).

UPDATE AND SOLUTION: Since the problem was independent neither on the USE database; nor FROM database.table and has been observed RANDOMLY (ex. run query, it works, then immediately run again with the same query and it didn't work anymore), I recreated the database simply filling it with data from backup and it helped.

1

There are 1 best solutions below

0
On

Best practice to write query.

databasename.tablename

example

SELECT * FROM database.table where 1 = 1