I had a major breakdown of the linux server 4 days ago , yesterday however I've managed with the guys from the hosting company to recover some data from the crashed hdd.
I basically got the entire httpdocs folder , including all the forum files + the complete forum database located in /var/lib/mysql/forumname
the files located in this folder /var/lib/mysql/forumname look like this:
access.frm
access.MYD
access.MYI
....
etc.
Now the server got a new HDD, everything was reinstalled from zero. I've set up the server again from Plesk CP, created a new mysql database with the same name like the old one, same username & password to access the mysql database.
After, I went to /var/lib/mysql/forumname and put back all the previously saved files and I hoped it will work.
It doesn't work. I got Database error when trying to access the forum.
What am I doing wrong ?
Daniel
Well, the first thing that I see that your .frm .MYI and .MYD are not located in its own database directory. Each DB managed by the MySQL Server has its own database directory. This exists as a subdirectory of the data directory, with the same name as the database it represents. ie .. /var/lib/mysql/forumname/DATABASE_NAME
In your case (as described above), you have an RPM installed MySQL as the data directory is located at /var/lib/mysql/forumname so within that directory, you should have a folder for each database and within that specific DB folder is where those files should be located..
NOW, you mentioned that you "created a new mysql database with the same name like the old one" Is there now a Folder in the var/lib/mysql/forumname directory with that database name? if so, move all those .frm .MYI and .MYD files into that directory.
the .frm files are called Form Files. They describe the structure of the table (its Columns, column types, indexes and so forth)
the Data Files .MYD (MyISAM) OR .ISD (ISAM) contain the table's data -- that is, its rows
the Index files .MYI (MyISAM) OR .ISM (ISAM) contain the index trees from any indexes on the data file. The index file exists whenther or not the table has any indexes...
Let me know if you have a database sub folder for the new data base you created (or if there are any other sub folders in the /var/lib/mysql folder.
--------------- Added [DATE]1202759912[/DATE] at [TIME]1202759912[/TIME] ---------------
Quote:
Originally Posted by valdet
If I am not wrong, those are raw database backup files, so you cannot restore them from phpmyadmin, but only from SSH.
I think your hosting guys can do that restore pretty easily.
Regards,
Val.
no, those are the actual files themselves that make up the database. Each table within a database exists as 3 files in the database directory (A Form File ie access.frm , a Data file ie access.MYD and a index file ie access.MYI)