Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Apr 2004
    Location
    IRan
    Posts
    8

    Question Import my Database in Cpanel

    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. #2
    Member
    Join Date
    Jun 2003
    Posts
    13

    Default

    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. #3
    Member
    Join Date
    Apr 2003
    Location
    Lewisville, Tx
    Posts
    968

    Default

    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.
    Kris
    NCServ, LLC.
    WebHosting - Dedicated Servers - Colocation
    sales@ncerv.com

  4. #4
    Member
    Join Date
    Apr 2004
    Location
    IRan
    Posts
    8

    Default

    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. #5
    Member
    Join Date
    Apr 2004
    Location
    IRan
    Posts
    8

    Default

    Wich commands should i use in the terminal?

  6. #6
    Member bamasbest's Avatar
    Join Date
    Jan 2004
    Posts
    531

    Default

    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. #7
    Member
    Join Date
    Apr 2004
    Location
    IRan
    Posts
    8

    Default

    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. #8
    Member bamasbest's Avatar
    Join Date
    Jan 2004
    Posts
    531

    Default

    Originally posted by Behrooz_Ice
    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
    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. #9
    Member
    Join Date
    Apr 2004
    Location
    IRan
    Posts
    8

    Default

    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

Similar Threads & Tags
Similar threads

  1. Import MySQL database
    By david_sh in forum Enkompass Discussions
    Replies: 1
    Last Post: 06-04-2011, 03:26 PM
  2. Import database
    By ASTRAPI in forum Database Discussions
    Replies: 4
    Last Post: 06-07-2009, 10:51 AM
  3. cPanel mysql database import problem
    By Shazz in forum Database Discussions
    Replies: 4
    Last Post: 09-09-2008, 12:53 AM
  4. Cant import database help!!!!!!!!!!!!!!!!!!!!!!!!!!
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-17-2005, 12:25 PM
  5. How Can I import data into an exsistense database
    By yumoryuk in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-19-2005, 05:43 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube