The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Import my Database in Cpanel

Discussion in 'General Discussion' started by Behrooz_Ice, Apr 3, 2004.

  1. Behrooz_Ice

    Behrooz_Ice Member

    Joined:
    Apr 3, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    IRan
    hello dear reader
    We have Tooken a backup from our site via Plesk Contorl panel , and now the database.sql is about 250mb , how can we imoprt this huge data base via cpanel into our new host for the vbulliten board. thank you
    Regards
    Behrooz Kamalian
     
  2. getnetworks

    getnetworks Member

    Joined:
    Jun 24, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    If it's a true MySQL dump file and not some Plesk proprietary file, you'd be best to upload it to the server and use the mysql CLI binaries to import it. Just create the DB using the cPanel first so it already exists such that you can then import it. Trying to the phpMyAdmin on a file that size can pose problems.

    FYI, neither of these options (with the exception of creating the DB) really involve cPanel.
     
  3. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    phpMyAdmin will actually reject a sql dump that big. You will have to use the msyq/mysqladmin commands via shell to get it imported. Create the DB on the new server as stated above and import it.
     
  4. Behrooz_Ice

    Behrooz_Ice Member

    Joined:
    Apr 3, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    IRan
    Thx for your help , our previous host was linux and it uses mysql and also our current host is linux , our new host is on our dedicated server and we have a shell access , but the problem is that we dont know how to import our sql database via the shell , would you please help us how to import the database via our shell account?
    Best Regards
    Behrooz kamalian
     
  5. Behrooz_Ice

    Behrooz_Ice Member

    Joined:
    Apr 3, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    IRan
    Wich commands should i use in the terminal?
     
  6. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    First, create the database(s) via cpanel,

    then

    shell> mysql --user=username --password database < /path/to/dumpfile.sql

    substitute your username, the databasename and path/to... to the correct values.
     
  7. Behrooz_Ice

    Behrooz_Ice Member

    Joined:
    Apr 3, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    IRan
    root@server1 [/home/ashiyan3]# mysql -u ashiyan3_vb -p 258369963 <ashiyane.sql.gz
    Enter password:
    ERROR 1044: Access denied for user: 'ashiyan3_vb@localhost' to database '258369963'

    dear sir , after typing this command in the terminal we get this error message , please tell us why does this error occures and if you mind helping us to import our database in our new account.
    Regards , bye
     
  8. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    I see,

    Firstly, you may want to gunzip the compressed .sql file.

    Secondly,

    look at the respective commands

    mysql> --user=ashiyan3_vb (OK, I assume)
    -p <leave this blank and respond when command line asks for password (more secure)>

    database <substitute the actual database, should be something like ashiyan3_<dbname>


    then, the pathe to the sql file (i.e. /home/ashiyan3/public_html/dbfile.sql

    See what happens now:)
     
  9. Behrooz_Ice

    Behrooz_Ice Member

    Joined:
    Apr 3, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    IRan
    ok dear , thx for your help , but this time this error occures:

    =============================

    root@server1 [/home/ashiyan3]# mysql -u ashiyan3_vb -p -D ashiyan3_vb< ashiyane.sql
    Enter password:
    ERROR 1064 at line 273385: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '<br />
    Fatal error: Maximum execution time of 30 second

    ==============================

    Sorry for this amount of questions i ask but making our site up is very important for us.
    Regards , bye
     
Loading...

Share This Page