Forum Moderators: coopster

Message Too Old, No Replies

Parser error when importing database

         

Distorted

9:44 am on Aug 26, 2007 (gmt 0)

10+ Year Member



Hey there. I'm relatively new to PHP and website creation as a whole, and am learning as I go. However, I did have a phpBB forum set up on my old host and am now in the process of changing hosts and moving my entire website, including the forum.

The problem I'm facing is with importing my old phpBB database.
The only backup of the database I have is a folder which contains a load of files with the following extensions: .MYI, .frm, .opt and .MYD.

I tried compressing this folder to ZIP and uploading it directly into phpMyAdmin but am faced with an error which states that there is a bug in the SQL parser. Or something to that effect.
So I try opening the actual files contained within my database [the .MYI etc. files] using Notepad and Wordpad and all that is displayed is a bunch of gibberish.

So I'm thinking that either my backup is corrupt or I'm doing something wrong.

As this is the only copy I have of my database, I really need it to work, somehow, as I have no other way of attaining another copy.

The exact error which occurs all relates to the first line of the first file in my database. But with no way to view the content I'm unable to see whats causing the error or unable to create the tables within phpMyAdmin manually.

If anyone has any experience with importing such files into phpMyAdmin, I'd be glad to hear of any solutions and/or help with this problem.

Thanks in advance.

Habtom

9:52 am on Aug 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't had a clue myself. But I tried to gather some ideas from other posts on the internet. Here is what I came up with.

The solution is. . .

to create a subdirectory in Mysql data dir called
$name_of_database, then drop these files into it,
chown/chmod to match the other Mysql data, and
restart Mysql.

Distorted

10:56 am on Aug 26, 2007 (gmt 0)

10+ Year Member



Thanks for the quick reply.

I've followed what you said, I've created a new folder in my MySQL data directory and copied the files there.
And it worked!

I did all this locally, so I will go to phpMyAdmin now and create the SQL file I need to upload to my host.

Thanks a bunch!

Habtom

11:00 am on Aug 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



np . . . and Welcome to WebmasterWorld.