simple and quick >> helppppp needed

Discussion in 'MySQL' started by visioninfotech, May 1, 2006.

  1. #1
    just need to import a file in mysql

    the file is c:/databases/ss.sql

    and want to import in a DB named guests

    have to import using mysql command line client.

    i had the syntax earlier, but now i forgot. please help.

    thanks a lot in advance
     
    visioninfotech, May 1, 2006 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    mysql -uUSERNAME -pPASSWORD DBNAME < sqlfile.sql
    Code (markup):
    Although based on your example path, you might be on a Windows server... that command will only work on UNIX I believe.
     
    digitalpoint, May 3, 2006 IP
  3. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i use that command in windows - it works... ;)
     
    daboss, May 3, 2006 IP
  4. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #4
    I recommend getting phpMyAdmin, it'll make importing DBs and just any other SQL function much easier, no need for command line :)
     
    sketch, May 4, 2006 IP
  5. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #5
    If you have the $$$ Navicat is good too, makes my life easier.
     
    donteatchicken, May 5, 2006 IP