问题
I have a large file from 2007 containing a backup (as a SQL Script) of a MySQL Database. It's for an unknown version of MediaWiki.
-- phpMyAdmin SQL Dump
-- version 2.6.2-Debian-3sarge3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 29, 2007 at 12:42 PM
-- Server version: 4.0.24
-- PHP Version: 4.3.10-19
I've tried installing mysql-5.5.8-win32 and mysql-workbench-gpl-5.2.31a-win32 but am getting syntax errors. Is there an easy way of making the old script compatible, or am I better of using an older version of MySQL? Are the dev tools still available for the older versions?
I am looking for the quickest simplest option as I only want to restore it to get hold of some old raw data, not to set it up fully.
回答1:
It would be worth to actually showing the error.
But anyway, SET sql_mode = MYSQL40
might help you if the syntax is really a problem. There might be issue with something what was not keyword before and now is, you would have to escape it in this case.
来源:https://stackoverflow.com/questions/4500812/restoring-an-old-mysql-backup