• maxim

    (@maxim)


    hi i got a big problem !, i moved servers so i backed up my database ready for the move, everything was going fine untill i got to the point to restore the.bak.sql file. heres the error i got,
    ———————————————————————

    USAGE : mysqldump[OPTIONS] DATABASE [ TABLES ] OR mysqldump[OPTIONS] – – DATABASES [OPTIONS]DB1[DB2 DB3 . . .] OR mysqldump[OPTIONS] – – ALL – DATABASES [OPTIONS] FOR more options, USE mysqldump – – help

    #1064 – You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Usage: mysqldump [OPTIONS] database [tables]
    OR mysqldump [

    —————————————————————–

    so i did a mysql -V and is said my version was 4.0.23 but i have no idea what syntax is wrong, has any one got any ideas for me ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • How big is your .sql file ?
    How are you restoring ?

    Less than 3meg:
    Open the .sql file in notepad, paste the entire file into the white box that appears when you click the SQL tab in phpmyadmin, click Go then make a coffee while you wait.

    Over 3 meg:
    Make a coffee first, open the .sql file in notepad, paste each “section” into the SQL box (as above) and follow the order carefully. Tedious stuff.

    If this does not help, then you could indeed have errors and it may be easier for you to get the .sql file to me so I can take a look
    tamba2 at gmail dot com

    vkaryl

    (@vkaryl)

    One thing I found when I had to restore a fairly large (8 mb) database (phpBB, not WP, but the circs might be similar): it only worked if I copied the “create table” info and input that into the query first, THEN followed up with the table info. And one table I had was over 3000 lines – that one had to have the table created first, then the info input in less than 800 line increments. It was a PITA – no doubt about it – but it did work.

    I agree with vkaryl – and I forgot to add something:

    Work from a BACKUP !
    Copy your .sql first.

    vkaryl

    (@vkaryl)

    Oh yeah. I forgot too! BACK IT UP! Heh….

    I received this error message when I tried to restore.

    Restore failed for Server ‘PASQL’. (Microsoft.SqlServer.Smo)

    ——————————
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

    ——————————
    Program Location:

    at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
    at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

    ===================================

    System.Data.SqlClient.SqlError: Directory lookup for the file “F:\SQLDataBase\prod\Inhouse_Data.MDF” failed with the operating system error 2(The system cannot find the file specified.). (Microsoft.SqlServer.Smo)

    ——————————
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476

    ——————————
    Program Location:

    at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
    at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
    at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

    New 2003 server. I’m I missing something or did I foreget to do something?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘restore failed after server upgrade !!’ is closed to new replies.