MySQL Forums
Forum List  »  Newbie

Re: Have a Database I Can't Backup: need to Do that because Need the Data
Posted by: Peter Brawley
Date: October 25, 2021 07:09PM

> I have this data:

...
> -rw-rw---- 1 mysql mysql 8688 Oct 25 17:14 wp_commentmeta.frm

.frm files have no data. They contain table structure only.

Safest way to back up databases on a MySQL server is with mysqldump, https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

In the mysql client program you can auto-generate a mysqldump cmd excluding the `test` database with something like this ...

set @dbs = (select group_concat(schema_name separator ' ')
from information_schema.schemata
where schema_name not in('test','information_schema','performance_schema') );

select concat("mysqldump -uUSR -pPWD -K -E -R ",@dbs, " >backup.sql" ) as cmd\G

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.