SA-MP Forums Archive
How to remove full database in one command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to remove full database in one command (/showthread.php?tid=596274)



How to remove full database in one command - DemME - 15.12.2015

Hey guys, so probably I'd like to have a command a simple one that will delete all the database that has in the server, something like /terminate or thing like that, and it will simply delete the database itself from the MySQL panel. Is it even possible?


Re: How to remove full database in one command - Lordzy - 15.12.2015

Код:
DROP DATABASE `database_name`;
By default the "DROP DATABASE" statement is disabled. You'll have to set "AllowUserDropDatabase" to true in "config.inc.php" file. I haven't tried running such an SQL command through server. I doubt your connection to MySQL server will be lost in case if the database which was referred in "mysql_connect" got removed.