Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to import SQL dump for user?

Discussion in 'Database Discussion' started by vivithemage, Sep 12, 2013.

  1. vivithemage

    vivithemage Member

    Joined:
    Jul 2, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    I have been trying to import an SQL dump, but am having no luck!

    I have been trying to use this, but no luck:

    Import MySQL Dumpfile, SQL Datafile Into My Database

    I have tried via phpmyadmin, but it just hangs there on a white page after a few seconds. The .zip dump was only about 26mb.
     
    #1 vivithemage, Sep 12, 2013
    Last edited: Sep 12, 2013
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,588
    Likes Received:
    2,184
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can access your server via SSH as root and run the following command:

    Code:
    mysql database_name < /path/to/database.sql
    Or, if you need to complete the task as the username, you can run:

    Code:
    mysql -u username -p database_name < /path/to/database.sql
    Thank you.
     
  3. vivithemage

    vivithemage Member

    Joined:
    Jul 2, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    I do that, but nothing happens after I enter the PW really.

    [email protected][/home/seacoast/www/SQL_Dumps]# mysql -u seacoast_bigdump -p seacoast_typ32 < seacoast_typ32.sql
    Enter password:
    [email protected][/home/seacoast/www/SQL_Dumps]#
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,588
    Likes Received:
    2,184
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    That indicates the database dump was successfully imported into the database.

    Thank you.
     
  5. vivithemage

    vivithemage Member

    Joined:
    Jul 2, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    Nothing shows up, I wonder if the dmp is empty....
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,588
    Likes Received:
    2,184
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    It's possible. You may want to review the dump file to see what it's contents are.

    Thank you.
     
  7. vivithemage

    vivithemage Member

    Joined:
    Jul 2, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    editing it in vi, all I see is:

    -- MySQL dump 10.11
    --
    -- Host: localhost Database: bigdump
    -- ------------------------------------------------------
    -- Server version 5.0.96-community

    /*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
    /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
    /*!40101 SET @[email protected]@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @[email protected]@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,588
    Likes Received:
    2,184
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, it looks like that database dump does not contain actual database content.

    Thank you.
     
  9. vivithemage

    vivithemage Member

    Joined:
    Jul 2, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    Thanks, that's probably the issue.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice