I am using the following command to import date.  The teldirt.txt file is
just a list of commands to remove 4 existing tables in the TelDir database
and then the SQL statements to add the tables and new data...

mysql --user=root --password=** TelDir < d:\database\teldirt.txt >>
d:\database\import.log

The import works fine and I am happy with it.  However, there is a problem
if there are any users using the database with MySQL itself. It won't allow
me to remove the tablles and import data (Sharing error?)

To get round this, before I run the mysql command I have i n my batch file
the commands

NET STOP MYSQL
NET START MYSQL

Immediately before the mysql import line.  This makes sure that there are no
active connetions.

Question is, is there a way to remove all active connections to the database
without having to run the NET STOP and START commands as they seem a bit
harsh, and if someone reconnects to the database straight away, the mysql
import still fails!

Any help appreciated

Richard



Reply via email to