PathFinder
PathFinder

Reputation: 87

Error in dropping database?


I tried the following mysql query to drop the database.Here am getting the following error in dropping with database.How can I solve it?

mysql> drop database xample;
ERROR 1010 (HY000): Error dropping database (can't rmdir './xample/', errno: 17)

Upvotes: 0

Views: 209

Answers (2)

YouBee
YouBee

Reputation: 2071

Try these steps if you are running on Xampp.

cd /opt/lampp/var/mysql;
sudo su;
rm -rf db_name;

where db_name is the name of db you want to remove.

Upvotes: 0

tadman
tadman

Reputation: 211720

If you've copied your database from another server and tried to restore it you'll see issues like this. One fix is to change ownership:

sudo chown mysql:mysql -R /var/lib/mysql

Where /var/lib/mysql is the place where your MySQL data resides. It may be in a different location, you'll need to check for sure.

Upvotes: 1

Related Questions