I am plowing through the tutorials and came to the place where I was to add data to a existing database. I have created the database 'demobase' and the two tables 'dep' and 'emp' and can enter data into them using the grid-based editor. This works fine. What doesn't work is entering data using a query.
When I press the 'New SQL' button on the Main Standard toolbar it opens a SQL1.sql window but to the wrong database. It opens it to the information_schema that is first on the list in the Database Explorer.
How do I manage to open a New SQL on the correct database?
Possible problem - I have a bad entry in the Database Explorer tree that I cannot delete. Its right between the information_schema database and the one that I want to open (demobase). Trying to drop the bad entry produces this:
Error dropping database (can't rmdir '.\sakila-db\,errno:17)
Is this causing the problem?
Fix?
Associating New SQL button with correct database
-
- Posts: 16
- Joined: Thu 28 Apr 2011 23:41
-
- Posts: 16
- Joined: Thu 28 Apr 2011 23:41
Fixed It
I had to reinstall studio for MySQL and that cleared it.
I really don't understand why developers don't put the code into their applications to maintain the contents of the drop down lists in combo boxes. Its always a pain in the ass when they get strange stuff in them.
I really don't understand why developers don't put the code into their applications to maintain the contents of the drop down lists in combo boxes. Its always a pain in the ass when they get strange stuff in them.

If you want the correct database to be chosen in a SQL document, you should set up a default database for your connection on the General tab in the Connection Properties dialog.
As for the problem with dropping a database in Database Explorer, it seems that this is a MySQL server problem. You can find the needed information in the Internet at MySQL forums. We found only one piece of advice from MySQL users that can help you to manage this problem. They say, you should stop your MySQL server, then delete the corrsponding folder on your hard disk, and start the server again.
But, this problem doesn't have any influence on choosing the default database in a SQL document.
As for the problem with dropping a database in Database Explorer, it seems that this is a MySQL server problem. You can find the needed information in the Internet at MySQL forums. We found only one piece of advice from MySQL users that can help you to manage this problem. They say, you should stop your MySQL server, then delete the corrsponding folder on your hard disk, and start the server again.
But, this problem doesn't have any influence on choosing the default database in a SQL document.