SSH and mysql problem

Discussion in 'MySQL' started by ryukenden, Mar 17, 2007.

  1. #1
    I have been trying to mysql a database using SSH by putty.

    I am having problem and would appreciate any help.

    In SSH command-prompt, I go to the directory where I keep sql file. Then I use following command.

    mysql -u username -p password database_name < file.sql

    It is not working. I got following.

    Any help, appreciated.
     
    ryukenden, Mar 17, 2007 IP
  2. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    cat file.sql | mysql whatever_options_you_need
     
    tandac, Mar 25, 2007 IP
  3. ryukenden

    ryukenden Well-Known Member

    Messages:
    2,791
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Hi
    What do you mean by cat file.sql?

    thank you
     
    ryukenden, Mar 25, 2007 IP
  4. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #4
    On Linux/Unix there is a command called cat.
     
    tandac, Mar 25, 2007 IP
  5. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #5
    If youre not so good with ssh ( *nix ) it would probably be simpler for you to download phpMyAdmin to administer your databases. http://phpmyadmin.net
     
    krakjoe, Mar 25, 2007 IP