that is the way i would do it. i have done similar things in linux...for example:
backup the mysql directory, then format and install the new OS.
then install MySQL (the same version, or if it is mysql 4.1.x, i would install a 4.1.x version, don't go from 4 to 5 this way, you probably would loose data).
then copy the backed up data into the same mysql directory. it works like a charm.
Forum:
WampServer English