M
M
mirosas2017-09-26 14:18:50
MySQL
mirosas, 2017-09-26 14:18:50

How to restore MySQL from a file copy?

Windows flew. It was decided to copy the files, put everything on a new one.
There are about 15 tables of a structure unknown to me on the InnoDB engine. And about the same number of MyISAM tables. There were no problems with MyISAM.
In principle, there is nothing very important there, but I would like to restore it. Can copy not only table files, but in general everything that was in program files and program data ? (I think it may not help - there must have been something else in the registry, but I don’t have its dump). I tried to set the MySQL version as close as possible to the one that was, but in fact there are differences in the file sizes. The old one was 5.6.unknown, the new one is 5.6.37
ps So far I've subtracted some method that assumes that I know the structure of the tables. I don't know their structure.
ps2. Interest is actually more for the future. Suddenly I have something important sometimes will be stored. You will never guess after what auto-update Windows will come up, and when you try to restore, it will also kill the recovery tool, and permanent backups will not work. it’s not very convenient to do, I’m a programmer, not an admin)).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mirosas, 2017-09-26
@mirosas

In general, the problem was solved quite simply. Without any dances with a tambourine. You just need to copy the entire contents of the program data\mysql folder, and most of the contents of the program files\mysql folder (although I'm not sure if the second is necessary).

M
Max Kostikov, 2017-09-26
@mxms

MyISAM is portable by simply copying database files, InnoDB is not. For the latter, you should use the regular mysqldump tools to make a copy and then restore mysql .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question