At 9:08 PM -0700 5/19/1999, Xah Lee wrote:
>Many people suggested:
>> DELETE FROM tablename
>Please note that my question asked for how to delete a database, not a
>table. Linux ignoramuses, please pay attention.
Insulting those who offer help isn't likely to get you a lot more help,
>Here's the question again: What is the 'best' (i.e. proper, standard,
>scalable, expedient etc.) way to delete all info in a given database but
>keeps the schema? (in mysql)
The mysqldump + mysqladmin + mysql method below should be reasonably
>(Btw, I'm aware that one can delete certain files in mysql data directories
>as a solution. My question stands as it is.)
Which files are you referring to here?
>> What's the standard way to wipe out every info in the database but keeps the
>> What I do now is to dump the database without data to a file, then drop the
>> database, then create it, then load it back from the file. (just learned
>> from this mailing list)
>> $mysqldump --no-data --password --host=server_name1 db_name > file_full_path
>> $mysqladmin --password --host=server_name1 --force drop db_name
>> $mysqladmin --password --host=server_name1 create db_name
>> $mysql --password --host=server_name1 db_name < file_full_path
>> Are there alternative? and what's the 'proper' way?
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/