0

I wrote a java application that interacts with my database and there was a problem with it. I had to delete the database since there were too many erroneous changes made by my application. I was careful and backed up my database before I ran the program, so I proceeded to drop the entire database with the intention of reverting back to the original.

I used phpMyAdmin to drop the database in question, but after 20 minutes it seemed like nothing was happening so I forced the browser to close and reloaded PMA. Expectedly, the database I wanted to delete still shows up in the list of databases in PMA, but when I try to access it, the browser goes blank and hangs. I tried to access the database from the terminal (I'm using OS X 10.4.11), and when I type 'use name_of_database', the terminal itself hangs too. I also tried to drop the database once again in the terminal, but that also hangs.

How can I get rid of this database now? I could always reload my database under a different name, but this one will still be here and I really want to get rid of it. Any ideas?

4

2 に答える 2

1

データベースサーバーを再起動する必要があります...ところで、これはJavaコードを実行しているときに起こりましたか? 接続を閉じるのを忘れたのか、db 接続を閉じるための finally ブロックがなくてプログラムがクラッシュしたのか疑問に思っています。

于 2012-04-16T02:46:49.657 に答える
0

まだ行っていない場合は、SSH を使用して mySQL にログインしてデータベースを削除します。

sudo mysql -u yourmysqlusername -p (プロンプトが表示されたらパスワードを入力します。)

mysql> データベースを表示します。(データベースを見つけます)

mysql> USE YOURDATABASETODROP; (データベースを変更)

mysql> DROP DATABASE YOURDATABASETODROP; (そして、あなたは終わりです。)

于 2013-09-30T14:47:02.987 に答える