Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Aug 2004
    Posts
    293
    cPanel/Enkompass Access Level

    Root Administrator

    Default MySQL Transfer

    Ok, i have a customer whos wanting to upload a fairly big database. I told him to upload it to his public_html folder with the understanding that i can use ssh to add it to the sql folder etc........

    Hes uploaded it but now im stumped, is there anyone who could give me a step by step on how to complete this?

    DB - techmob_ipbnuke.gz (and is located in the customers public_html directory)

    Thanks in advance for any help.

    Steven

  2. #2
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    tar xvzf techmob_ipbnuke.gz

    mysql -uUSERNAME -pPASSWORD DATABASE_NAME < YOUR_FILE/YOUR_FILE.sql

    Where YOUR_FILE/YOUR_FILE.sql is what you wouild get from first command.
    Substitute USERNAME , PASSWORD, DATABASE_NAME with the values that you have for the user

    Anup

  3. #3
    Member
    Join Date
    Aug 2004
    Posts
    293
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Ok, tried that, this is what i get after the first command :

    root@server1 [/home/techmob/public_html]# tar xvzf techmob_ipbnuke.gz
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains obsolescent base-64 headers
    tar: Error exit delayed from previous errors


    Any suggestions?

  4. #4
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    Google around

    Anup

  5. #5
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default

    It didn't work because, like the error said, it is not a tar file. Try this:

    gunzip techmob_ipbnuke.gz

    mysql user_dbname -u user -p**** < /home/username/techmob_ipbnuke
    Marty Hoskins
    TLC Web Enterprises

  6. #6
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    tar <options>

    x - extract files from an archive
    v - verbose
    z - filter the archive through gzip

    It always worked for me provided the file was not corrupted (many reasons for that ... something silly like uploading the compressed archive in ascii mode)

    Anup

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default

    Quote Originally Posted by anup123
    tar <options>

    x - extract files from an archive
    v - verbose
    z - filter the archive through gzip

    It always worked for me provided the file was not corrupted (many reasons for that ... something silly like uploading the compressed archive in ascii mode)

    Anup
    I may be wrong, but I am pretty sure that should only work on a file that was tarred AND gzipped. In this case, the file is only gzipped.
    Marty Hoskins
    TLC Web Enterprises

  8. #8
    Member
    Join Date
    Aug 2004
    Posts
    293
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Thanks for the reply guys, ill have to try them tomorrow, ill let you know.

    Cheers
    Steven

  9. #9
    Member
    Join Date
    Sep 2004
    Posts
    422

    Default

    Login as root:

    gunzip techmob_ipbnuke.gz


    If they haven't added the db in cpanel yet, with a user, password then..

    # mysql

    > CREATE DATABASE techmob_ipbnuke;
    > GRANT ALL ON techmob_ipbnuke.* TO $user@localhost IDENTIFIED BY '$password';
    > FLUSH PRIVILEGES;
    > quit

    # mysql techmob_ipbnuke < techmob_ipbnuke (the last one is the name of the sql file)

    Change $user, $password to the real database user and their password respectively, which they can let you know if you can't see it by checking their mysql connection script that is located on their account, if it is there.

    Otherwise if the db exists already , just

    # mysql techmob_ipbnuke < techmob_ipbnuke

    Should do.
    Last edited by DigitalN; 02-11-2005 at 03:59 PM.

Similar Threads & Tags
Similar threads

  1. No mySQL db after site transfer
    By BluAzn in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-15-2009, 02:52 PM
  2. How can I transfer a mysql databases ?
    By F_A_H_D in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-25-2006, 07:44 PM
  3. MySQL Database Transfer
    By emo_boy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-23-2005, 12:06 PM
  4. Account Transfer & mySQL
    By haze in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-06-2002, 06:39 PM
  5. Transfer Account and MySql
    By kwimberl in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-20-2002, 02:29 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube