0

I have seen in several tutorial that the "DROP" command will drop the database, but it is not deleted. Why is my database not deleted ?

mysql> DROP DATABASE www_example_com;
Query OK, 645 rows affected (3.36 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| www_example_com    |
+--------------------+
5 rows in set (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| www_example_com    |
+--------------------+
5 rows in set (0.00 sec)
20f2c98f50
  • 39
  • 2
  • 11

1 Answers1

1

Does that database have active connections which are keeping the database from being dropped?

You can see active connections using www_example_com with mysqladmin processlist -u root -p. If you can restart mysql that will fix it the easiest. If you can't then you need to terminate those connections with mysqladmin kill <process>

Logan
  • 146
  • 3