Skip to main content
clarification
Source Link
Buttle Butkus
  • 1.2k
  • 3
  • 11
  • 21

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

1.)

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

2.)

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick. This would be the same effect as the accepted answer or killing the mysql process from the mysql command line.

Then run

DROP DATABASE `database_name`;

And everything should be clean.


Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as the "accepted answer" instead of this one.

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.


Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as the "accepted answer" instead of this one.

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

1.)

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

2.)

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick. This would be the same effect as the accepted answer or killing the mysql process from the mysql command line.

Then run

DROP DATABASE `database_name`;

And everything should be clean.


Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as the "accepted answer" instead of this one.

deleted 57 characters in body
Source Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663

As per the edit in my question, I believe this is the answer:

Though I thought that the import process had died, it was probably still running.

The DROP DATABASEDROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASEDROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

EDIT:

 

Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as "bestthe "accepted answer" instead of this one.

As per the edit in my question, I believe this is the answer:

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

EDIT:

Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as "best answer" instead of this one.

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

 

Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as the "accepted answer" instead of this one.

added note about new answer that seems to be better than my own
Source Link
Buttle Butkus
  • 1.2k
  • 3
  • 11
  • 21

As per the edit in my question, I believe this is the answer:

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

EDIT:

Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as "best answer" instead of this one.

As per the edit in my question, I believe this is the answer:

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

As per the edit in my question, I believe this is the answer:

Though I thought that the import process had died, it was probably still running.

The DROP DATABASE command probably waited for the database to finish importing before it ran.

So, rather than DROP DATABASE taking a long time, it was probably just the import.

If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:

$ kill [PID]

...where [PID] would be the actual PID for the process.

You should see the import halt immediately if the other terminal is still connected.

You could also run SHOW PROCESSLIST in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick.

Then run

DROP DATABASE `database_name`;

And everything should be clean.

EDIT:

Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as "best answer" instead of this one.

added another way to find and kill a mysql process
Source Link
Buttle Butkus
  • 1.2k
  • 3
  • 11
  • 21
Loading
Source Link
Buttle Butkus
  • 1.2k
  • 3
  • 11
  • 21
Loading