SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    restore mysql from dump in windows

    Hello... I have mysqldump of my database and I want to restore it in my local machine where I use mysql and php under windows. How can I restore it? I tried using phpMyAdmin, but I get time outs, because is a big dump... over 200MB.

    Any help, would be appreciated.
    Guillermo

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    mysql -uusername -ppassword database_name < /path/to/dump/file.sql
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I run the program located in C:\mysql\bin\mysql.exe and type in there
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 33 to server version: 3.23.32-debug

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer

    mysql> mysql -uroot -pthepassword vbulletin < E:vbulletin.sql;
    I get this error
    ERROR 1064: You have an error in your SQL syntax near 'mysql -uroot -pthepassword vbulletin < E:vbulletin.sql' at line 1
    Any idea what could be wrong?
    Last edited by pulsorocker; Jan 5, 2002 at 19:09.
    Guillermo

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah you need to run ti from the command prompt not the mysql prompt. Exit from the mysql program before running it. Lose the semilcolon on the end and make the path E:\vbulletin.sql not E:vbulletin.sql



    So something like.

    C:\mysql\bin>mysql -uroot -pthepassword vbulletin < E:\vbulletin.sql
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, that's not run from the mysql client -- it's not a query. it is *FOR* mysql, to be run from the command line. here's exactly what you need to do:

    open Command Prompt and type

    cd \mysql\bin

    then type

    mysql -uroot -ppassword vbulletin < E:\vbulletin.sql

    done.

    EDIT: oh dang, freddy beat me...

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I gotta take the easy ones when I can.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.. It worked fine.
    Guillermo


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •