You can create separate files containing only those statements and no data, and keep them around if you need them. Going forward: your ordinary SQL backup files should not contain data definition language such as DROP TABLE or CREATE table statements. It's not a surprise it works poorly, it's a wonder it works at all. If you successfully restore them, think of your accomplishment as a talking donkey. Treating those files as backups is a sketchy and risky business.
To use those you'll need to figure out how to put them in the right place in the server file system and restart the MySQL server that's looking at them. What the workbench can't do is help you with the FRM and MYD files. Then restore that clean backup to create a new production database. I'd actually create two backup items: one containing just the CREATE TABLE statements, and the other containing just data. Once I was convinced my copy was correct, I'd make an SQL backup of the whole thing. I'd then mess around trying to get stuff restored in the right order. If this were my project, I'd create a sacrificial copy of the database and all the backup files.
MySQL doesn't have that kind of thing, so whatever you have is either home-grown or based on some sort of third party software package. Commercial RDMSs like Oracle have elaborate schemes for making incremental and differential backups, along with schemes for restoring them. That means you'll have to work out that order very carefully indeed from the files you have. On the subject of differential and incremental backups, you'll have to restore your SQL files in the correct order to get the results you hope for. Finally, use the workbench or any other client to run the remaining INSERT statements. Then, find and remove the DROP TABLE and CREATE TABLE statements. I've compiled many versions of MySQL, MariaDB and Percona Server (it's my preferred way of installing - multiple servers on the same machine are a piece of cake) and I've never had a problem with buggy software (apart from the car-wreck that is MySQL that is! ).Ĭompiling an old version on a new OS will work - the reverse may not be, but I've never done that. What you're really paying for is support and monitoring/backup tools which are not available under the GPL.įinally, and perhaps to put you at ease (and even answer the question ), if you can compile it, it works. If you pay, you're pretty much on your own.
If you download community binaries you're on your own.
If you compile it yourself, you're on your own. For example, MySQL is available under the GPL and a commercial licence. To clarify, they can, but generally don't. This is even though they're actually paid for software - at least the GPL doesn't charge money. The GPL doesn't and neither do the commercial companies - the IT industry is notorious for not actually guaranteeing their work as being fit for purpose in any way and indemnifying themselves against any damages that could be caused.