Click to See Complete Forum and Search --> : [RESOLVED] MySQL broken - error #1034


Dasher
05-30-2009, 03:58 PM
I have a problem with MySQL on my Windows system. I used to use MS IIS for my sever and separate installs of PHP and MySQL. I uninstalled those, and installed the latest version of WAMP.

I have a problem now where I can not get results from queries. I get an error message in phpmyadmin : #1034 - Incorrect key file for table 'mytable'; try to repair it. I get the same error on all of the 14 tables in the database.

I moved the files from the previous MySQL data folder, by copying and pasting the database folder. Not sure what the problem is, or how to fix it.

chazzy
05-30-2009, 08:12 PM
I think I know what the problem is.

I moved the files from the previous MySQL data folder, by copying and pasting the database folder.

You should have run the mysql command line utility mysqldump to make a hot backup of your database, then when done w/ the new install you should have imported the created sql file to recreate your table structure + data.

Dasher
05-30-2009, 10:13 PM
Interesting. I took a different tactic.

I uninstalled WAMP2 which uses Apache 2.2.11, PHP 5.2.9-2, and MySQL 5.1.33 and replaced it with WAMP5 which uses Apache 2.2.6, PHP 5.2.5, and MySQL 5.0.45 > recopied the files to the data folder of MySQL and no #1034 error.

Not really sure what the deal is with WAMP2 - I have never had a problem copying files for MySQL before. I often copy the data folder or a database folder within 'data', and transfer from one computer to another no problem. No problem until WAMP2 that is.

chazzy
05-31-2009, 10:08 AM
what version was your original mysql, before you caused this entire mess? typically, copying it will only sort of work if it's the same version of the database.

Dasher
06-03-2009, 12:40 AM
Sorry - didn't get back here for a couple days. The database was originally constructed using version 3.2.3 back in 2003. I use the DB for scoring gymnastics meets. It has 14 tables, and all of them had the same error when trying to access them. Not even a 'describe table' command would work.

Originally I was running IIS, and PHP/MySQL as all separate installs. When I bought a laptop with VISTA on it, I switched to WAMP, and everything still worked fine. Not sure what version I had there, had to re-image the computer a few months ago, for an unrelated problem.

It wasn't until the latest version of WAMPserver did it all go wacky. Not sure if there is something different in default settings of MySQL or what. I also installed WAMP server on my desktop and had the same problem.

Fortunately backtracking to a slightly older version seemed to fix all the ills. Searches on 1034 errors did not turn up much useful info, and none seemed to point to a version or ini parameter problem.