How to import old MySQL data into mariadb?
I have several old databases recovered fom a machine that went belly-up some years ago. The data consist of table triples - eg:
tblCurrencyTransactions.frm tblCurrencyTransactions.MYD tblCurrencyTransactions.MYI I have tried just putting these into the /usr/lib/mysql directory and starting mariadb. Through phpMySql I can see the tables, but any attempt to view the data returns the error "#1033 - Incorrect information in files 'tblCurrencyTransactions.frm'". Is there any way I can massage these data into a format digestible by mariadb? Thanks in advance for any help. Cheers, Doug |
Try "insert" them into old version of database (same that they was used), then make dump or other "export" to sql commands and run it with new engine.
|
/usr/lib/mysql/db_name/
|
Quote:
Code:
MariaDB [phoenix]> SHOW TABLES; Thanks for taking the time to reply, though - it is appreciated. |
Quote:
I will have an interesting time tracking down a 2004 version of MySql. Thank goodness for Google. "8-) |
Quote:
I calculated that the version I was using in 2004 was probably 4.0.x. I found a source archive at http://live.dadanini.at/mysql/downlo...mysql-4.0.html, which I duly downloaded, however it will not configure on my architecture: Code:
checking LinuxThreads... Not found |
Quote:
The meta-permissions and properties for the phoenix db may be missing from the mysql db also. You could try copying the entirety of the old /var/lib/mysql/ to the new /var/lib/mysql/ Without the "overhead" for the phoenix db, it's a crap shoot. Can you desc anything on the phoenix db? Can you export it from there? mysqldump it? |
Quote:
Thanks for the suggestion "8-) Cheers, Doug |
Quote:
Additionally, you could attempt a table repair on the new://var/lib/mysql/phoenix/ That may give you more than a generic "Incorrect information in file" blurb. But I reckon it is progress! |
Quote:
Thanks again for the help and for putting me on the right path. LQ rules - again! Cheers, Doug |
make fresh backup now, resulting in sql commands, not bin files ;)
Good luck! |
Code:
mysqldump -uroot -p phoenix > /path/to/save/$(date +"%F")-phoenix.sql |
Quote:
I will start again this morning after a strong, hot coffee. "8-) |
Quote:
By the way, can you tell from the below, what version of MySql these files 'belong' to? Code:
[root@womble lib]# file mysql_old/mysql/* Doug. |
I cannot tell, sorry.
|
Quote:
|
Quote:
Many thanks for all the help. Kind regards, Doug |
Your file listing give me an idea, that current MariaDB uses InnoDB as default.
Read here https://dev.mysql.com/doc/refman/5.7...ge-engine.html and maybe here https://dev.mysql.com/doc/refman/5.7...databases.html and maybe it helps you. |
Glad it worked out.
|
Quote:
Kind regards, Doug |
Quote:
If nothing else, you have given me something to research, but it would be good if you could give me a head start in understanding it. "8-) Kind regards, Doug. |
Quote:
Code:
inxi -Fsz -c0 | nc termbin.com 9999 termbin is a site, not a program. inxi is the program. Where it is on your distro? IDK sorry. Details on how, why, and what for termbin are at termbin.com. (not my site) Links are easier on the board as some new members have trouble with [code][/code] markup(s) on textual output. So asking them to paste a link is easier than trying to implement a "how to use [code][/code] markups" on vBulletin software. |
Quote:
I found inxi on my system - I must have mistyped the name before. The output to my terminal, without piping to termbin, is as follows, so what is termbin needed for? "8-/ Code:
System: Host: womble Kernel: 4.11.4-200.fc25.x86_64 x86_64 (64 bit) Desktop: N/A Cheers, Doug. |
All times are GMT -5. The time now is 04:17 PM. |