Michealfan Posted June 21, 2009 Posted June 21, 2009 Hi! How can I delete my old Sql Db which are no longer in use when the deleting database facility has been disabled by the webhost?
Mark H. Posted June 21, 2009 Posted June 21, 2009 If you have to actually *delete* it, this won't work. But if all you want to do is effectively kill it and remove the data from within, for security reasons: Go into phpMyAdmin, select the database, select all the tables and use the DROP command.
Michealfan Posted June 22, 2009 Author Posted June 22, 2009 Thank you for your help. It worked but isn't it possible to delete the entire database itself so that no of db comes down to 1 or 2 which is currently in use.
Mark H. Posted June 22, 2009 Posted June 22, 2009 I don't think you can delete the database within phpMyAdmin, but I'm not 100% sure. On my dedi, even the root user doesn't have the option. I might have missed a config setting when I set it all up, but I don't think so. Either way, perhaps the simplest thing would be to open a support ticket with your host, and have *them* delete the database.
AndyF Posted June 22, 2009 Posted June 22, 2009 I can on my shared hosting, at least I think I did a long time ago (around 2006) Select the database (from the left side panel) so you are viewing the tables etc, then along the very top choose "Drop" Please make 100% sure you are looking at the right database first :o Alternative: Cpanel > MySQLDatabases > Sometimes there is an option here to delete it (along with the assigned database users too) :)
Mark H. Posted June 22, 2009 Posted June 22, 2009 AndyF, I know it's splitting hairs, but DROP != DELETE. He already dropped all tables, resulting in an empty database. But inside phpMYAdmin there's no option that I can find to actually *delete* the database, which is what he originally wanted to do. In my case, I have to use the cPanel -> MySQL Databases menu to delete a database, even as the root user. (Caveat: Like I said, I may have missed a setting in phpMyAdmin, but I don't think so.)
Brandon D Posted June 22, 2009 Posted June 22, 2009 If permissions allow, you can still "delete" a database by dropping it (DROP DATABASE dbname) from within phpMyAdmin, like you can the tables. As Andy said, if you click on the database in the left hand column you should see a Drop tab on the top right of the table listing (now empty since you've dropped all the tables). This should drop (delete) the entire database assuming you have permissions to do so.
Mark H. Posted June 22, 2009 Posted June 22, 2009 That's interesting..... 2-step DROP? Thank you. I'll have to go test that.
Brandon D Posted June 22, 2009 Posted June 22, 2009 Well, it's not exactly "2 step". You can drop a database with tables in it. This will simply drop a table within a database While this will drop an entire database, including any tables within itDROP TABLE table_name;DROP DATABASE database_name;
Mark H. Posted June 22, 2009 Posted June 22, 2009 No, I meant 2-step using only the available "buttons", rather than a query window. Either way, I'm going to test that.
Bono Posted June 22, 2009 Posted June 22, 2009 Like somebody said he can delete his database within cpanel.
rct2·com Posted June 30, 2009 Posted June 30, 2009 Why is it important to delete it anyway? If you can drop all the tables in it, you can always add new tables later, and use the same old database name for a different purpose.
Michealfan Posted July 1, 2009 Author Posted July 1, 2009 [quote name='RainbowViper' date='22 June 2009 - 09:02 AM' timestamp='1245690125' post='1812511'] AndyF, I know it's splitting hairs, but DROP != DELETE. He already dropped all tables, resulting in an empty database. But inside phpMYAdmin there's no option that I can find to actually *delete* the database, which is what he originally wanted to do. In my case, I have to use the cPanel -> MySQL Databases menu to delete a database, even as the root user. (Caveat: Like I said, I may have missed a setting in phpMyAdmin, but I don't think so.) Correct - I have dropped the tables, resulting in an empty database and yes I am aware of this other option of deleting the databases through cpanel but you may like to call it starnage or whatever but i was able to successfully delete one database with that option but thereafter couldn't. Although cpanel claims that database has been deleted but it isn't deleted in actual. [quote name='Brandon D' date='22 June 2009 - 09:11 AM' timestamp='1245690687' post='1812521'] If permissions allow, you can still "delete" a database by dropping it (DROP DATABASE dbname) from within phpMyAdmin, like you can the tables. As Andy said, if you click on the database in the left hand column you should see a Drop tab on the top right of the table listing (now empty since you've dropped all the tables). This should drop (delete) the entire database assuming you have permissions to do so. [quote name='Brandon D' date='22 June 2009 - 09:14 AM' timestamp='1245690857' post='1812523'] Well, it's not exactly "2 step". You can drop a database with tables in it. This will simply drop a table within a database While this will drop an entire database, including any tables within it I tried that too before coming up here but again that doesn't works for me because of permission issues.DROP TABLE table_name;DROP DATABASE database_name;
Mark H. Posted July 1, 2009 Posted July 1, 2009 Given what you've said, you definitely need to get your host involved. Especially if the database isn't showing up in cPanel, but is still listed in phpMyAdmin. Did you contact them before? Are they giving you a ration of grief, or just not responding?
Michealfan Posted July 2, 2009 Author Posted July 2, 2009 [quote name='RainbowViper' date='01 July 2009 - 12:15 PM' timestamp='1246479332' post='1818506'] Given what you've said, you definitely need to get your host involved. Especially if the database isn't showing up in cPanel, but is still listed in phpMyAdmin. Did you contact them before? Are they giving you a ration of grief, or just not responding? I don't think I have ever said that databases shows up in phpmyadmin and not in cpanel.... All I said was that even though it says database deleted successfully in the cpanel when attempted but in actual it isn't deleted.
Mark H. Posted July 2, 2009 Posted July 2, 2009 Then contact Support for your Host. They will have to fix your account.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.