Forum Articles
WJunction


  1. #1
    Banned The Rock's Avatar

    Website(s):
    Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics

    Post How to IMPORT MySQL database using SSH in Kloxo On VPS ??

    How to IMPORT MySQL database using SSH in Kloxo On VPS ??

  2. #2
    Member

    • My Statistics

    Default

    Code:
    mysql -u username -p database_name < dumpfile.sql
    Use that

  3. #3
    Member Cory's Avatar

    Website(s):
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net HostedTalk.com JustOneMoreBlock.com
    • My Statistics

    Default

    Awesome useful tool, I have coded a ssh script once before because I could never remember the correct syntax.

    Code:
    echo "MySQL Username"
    read username
    echo "MySQL Database"
    read database
    echo "MySQL File"
    read file
    mysql -u $username -p $database < $file
    Copy and Paste, save as: mysqlimport.sh - chmod +x 755 and sh mysqlimport.sh and follow the onscreen prompts, I should update my easy ssh tools.
    Last edited by Cory; 18th Jun 2011 at 08:00 PM.
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  4. #4
    Banned The Rock's Avatar

    Website(s):
    Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics

    Default

    Quote Originally Posted by Forgiven View Post
    Code:
    mysql -u username -p database_name < dumpfile.sql
    Use that

    i try that but its not working...

  5. #5
    Member Cory's Avatar

    Website(s):
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net HostedTalk.com JustOneMoreBlock.com
    • My Statistics

    Default

    You have to be in the same directory as the file.
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  6. #6
    Banned

    Website(s):
    takedownpiracy.com
    • My Statistics

    Default

    it should be

    mysql -uusername -pdatabase_name < dumpfile.sql

  7. #7
    Respected Member

    • My Statistics

    Default

    And the error is?

  8. #8
    Banned The Rock's Avatar

    Website(s):
    Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics

    Post

    Quote Originally Posted by Lifetalk View Post
    And the error is?
    No such files directories
    i give with this also home/admin/my directories.
    Last edited by The Rock; 18th Jun 2011 at 07:56 PM.

  9. #9
    Respected Member

    • My Statistics

    Default

    Quote Originally Posted by Dj Mad View Post
    it should be

    mysql -uusername -pdatabase_name < dumpfile.sql
    That syntax is wrong. There's a space between -u and the username. There is, however, no space between -p and the password (or the password can be left blank and entered at the prompt that follows).


    @OP
    cd to the directory where the .sql file is hosted, then run the command

  10. #10
    Member Cory's Avatar

    Website(s):
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net HostedTalk.com JustOneMoreBlock.com
    • My Statistics

    Default

    I don't think it matters, I've used the first syntax and the ones without spaces and they all tend to work.
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

Results 1 to 10 of 10

Similar Threads

  1. Database Import Problem
    By Praveer in forum Server Management Help
    Replies: 16
    Last Post: 23rd Jun 2011, 07:54 AM
  2. How to Import database.sql
    By Trusteduploader in forum Web Application/Script Support
    Replies: 6
    Last Post: 27th Mar 2011, 05:00 PM
  3. Cannot import phpbb2 database :S
    By babarali124 in forum vBulletin
    Replies: 2
    Last Post: 12th Jun 2010, 04:52 PM
  4. Replies: 5
    Last Post: 25th Apr 2010, 12:28 PM
  5. How to import a large database
    By desibreaker in forum Server Management Help
    Replies: 17
    Last Post: 26th Oct 2009, 12:43 AM