itsdarrylnorris / lazydubuntu

(Deprecated) Setting Up my Drupal Enviroment in Ubuntu
http://www.lazydubuntu.com
Apache License 2.0
20 stars 10 forks source link

Remove Database on delsite #22

Open itsdarrylnorris opened 9 years ago

itsdarrylnorris commented 9 years ago

Problem:

Went we remove a virtual host by typing sudo delete-website this only remove the files and not the database.

Solution:

We need to find away to remove the database that is connected with this virtual host if is necessary.

itsdarrylnorris commented 9 years ago

Here is a great resource that provide you information about removing database http://stackoverflow.com/questions/1082130/how-to-remove-mysql-database

So this patch is going to looks something similar too:

# Login to the MySQL
mysql -u root -p
# This is going to ask for a MySQL credentials

# Removing the database
 drop schema <database_name>; 
 FLUSH PRIVILEGES;