New Topic
Results 1 to 10 of 10

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

  1. The Rock's Avatar
    The Rock is offline Banned
    • My Website(s)
      Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics
    #1
    18th Jun 2011, 07:03 PM
    How to IMPORT MySQL database using SSH in Kloxo On VPS ??

  2. .:Raymond:.'s Avatar
    • My Statistics
    #2
    18th Jun 2011, 07:17 PM
    Code:
    mysql -u username -p database_name < dumpfile.sql
    Use that

  3. Cory's Avatar
    • My Statistics
    #3
    18th Jun 2011, 07:28 PM
    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. The Rock's Avatar
    The Rock is offline Banned
    • My Website(s)
      Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics
    #4
    18th Jun 2011, 07:38 PM
    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. Cory's Avatar
    • My Statistics
    #5
    18th Jun 2011, 07:46 PM
    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. Dj Mad's Avatar
    Dj Mad is offline Banned
    • My Website(s)
      takedownpiracy.com
    • My Statistics
    #6
    18th Jun 2011, 07:48 PM
    it should be

    mysql -uusername -pdatabase_name < dumpfile.sql

  7. Lifetalk's Avatar
    • My Statistics
    #7
    18th Jun 2011, 07:49 PM
    And the error is?

  8. The Rock's Avatar
    The Rock is offline Banned
    • My Website(s)
      Dlwave.info FlickW.com DirtyDingo.org SoftLayer.com Wjunction.com WorldSex.com
    • My Statistics
    #8
    18th Jun 2011, 07:50 PM
    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. Lifetalk's Avatar
    • My Statistics
    #9
    18th Jun 2011, 07:59 PM
    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. Cory's Avatar
    • My Statistics
    #10
    18th Jun 2011, 08:00 PM
    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)

Similar Threads

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

Posting Permissions

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