cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
donghocat_phl
Level 4

Can not drop MySQL DB when uninstall

Hi everybody!


When install, i create MySQL DB by SQL Scripts in Installscript MSI, it's done well.
When Uninstall/remove, i want to drop DB. I too use SQL scripts, SQL Script file ran OK but DB was not Droped.

My SQL Script file: "DROP DATABASE IF EXISTS DBname"

I try another script when uninstall such as: "Create table". It's done well.
I don't know, installshield can drop DB ?

Pls, help me?
Labels (1)
0 Kudos
(3) Replies
hidenori
Level 17

Make sure that the target database is not in use when you try to delete it. The case usually happens when your SQL script is associated with a connection targeting that database.

Hope that helps.
0 Kudos
binoco
Level 3

I think that my DB is not accessed, but how to check that.
Could you tell me?
0 Kudos
hidenori
Level 17

Change the associated connection to connect to other database than one that you are trying to delete, or add the "USE MySQL" statement before your DROP DATATBASE statement, and see if it solves your issue.
0 Kudos