Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 21, 200915 yr 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?
June 21, 200915 yr 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.
June 22, 200915 yr Author 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.
June 22, 200915 yr 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.
June 22, 200915 yr 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) :)
June 22, 200915 yr 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.)
June 22, 200915 yr 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.
June 22, 200915 yr 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;
June 22, 200915 yr No, I meant 2-step using only the available "buttons", rather than a query window. Either way, I'm going to test that.
June 30, 200915 yr 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.
July 1, 200915 yr Author [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;
July 1, 200915 yr 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?
July 2, 200915 yr Author [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.
Archived
This topic is now archived and is closed to further replies.