Answer the question
In order to leave comments, you need to log in
How to transfer all mysql databases from Win files to Linux?
There is access to the folder on the screw where MySQL was spinning under win7, something_there/data/, where there are a bunch of folders with database names, inside each there are a bunch of files table_name.frm in the data folder itself there are also 3 heavy files ib_logfile0, ib_logfile1, ibdata1 and 1 file named COMPUTER_NAME.err.
How now to transfer all databases from there to MySQL under ubuntu?
UPD:
since a simple transfer of files did not work (mysql died, resuscitation was difficult), raised a new mysql server to win7, copied the old files, leaving ib_logfile0, ib_logfile1, mysql/ from the new ones; renamed OLD_COMPUTER_NAME.err to NEW_COMPUTER_NAME.err (I'm not sure if this was necessary - it might have been possible to do without replacing this file, but I describe here how I solved my problem), restarted the mysql service and then simply dumped all the databases through mysqldump and restored it already in ubuntu.
Thank you all for your attention and assistance.
Answer the question
In order to leave comments, you need to log in
In theory, I don't have any problems. Just make a backup of the data folder in Linux, then delete it, and transfer the folder from the Windows database to its place.
If everything is done correctly and the MySQL versions are identical, everything will work without problems.
ps restart do not forget :)
myIsam can be transferred simply by copying. innoD in the dump.
It's safest to use mysqldump and mysql database < dumpfile.sql
As a last resort, you can use phpmyadmin to generate the dump and mysqldumper to load it (or again mysql database < dumpfile.sql), but I've encountered that when generating a dump with phpmyadmin and loading it into the mysql database swears at some comments ...
If you're just migrating by copying files, be aware that Linux filenames are case sensitive. And since the table is a file, then in the sql query you must use the names of the tables in the same case in which the table files are named.
The main thing is to make sure that the configs match with respect to a couple of key points.
In principle, if that mysql quite distinctly swears.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question