issue transferring 1 db from one site to another

Discussion in 'Site & Server Administration' started by Dirty-Rockstar, May 30, 2007.

  1. #1
    OK I go to site1 into cpanel and export the Database called site1_database
    as SQL. save as file __SERVER__ with compression zip. Ive tried export type Insert and Replace

    I go to site2 and create a database called database so now this is site2_database

    I try to import site1_database and i get this error

    SQL query:

    -- phpMyAdmin SQL Dump
    -- version 2.9.0.2
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: May 30, 2007 at 09:32 PM
    -- Server version: 4.1.21
    -- PHP Version: 4.4.2
    --
    -- Database: `site1_database`
    --
    CREATE DATABASE `site1_database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    MySQL said: Documentation
    #1044 - Access denied for user 'site2'@'localhost' to database 'site1_database'


    With my cpanel account im limited to only 1 database so i tried to install it not creating a db in the first place(afterall im inporting one, not just tables) and i the same error spits out at me. im thinking im not to create a database first. I have that figured out but whats with the error message

    the name of the file im trying to Import is localhost.sql.zip

    thanks for your support
     
    Dirty-Rockstar, May 30, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, since you created a database on server2, you don't need this line
    You can remove that line from the export
     
    cyanide, May 30, 2007 IP
    Dirty-Rockstar likes this.
  3. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3

    ok that stopped that error, its just taking forever to "upload" i guess at least this gives me something to play with now

    if i hit another issue ill reply here

    1+ thanks
     
    Dirty-Rockstar, May 31, 2007 IP
  4. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How big is the file?
    phpMyAdmin can handle only so much before it times out. Usually 10mb or less
     
    cyanide, May 31, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Use bigdump if you have a very large MySQL database.

    The above problem is due to the user unable to connect to database.

    I can help you solve it, PM me if you want:)
     
    inworx, Jun 1, 2007 IP
  6. zonzon

    zonzon Peon

    Messages:
    100
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    it's far better if you have direct access, maybe remotely, to the server. The best thing is to use mysqldump to export to a file and transfert it to the other server and then import.

    phpMyAdmin have some limitations regarding to databases size because the php script timeout parameter, post size, etc....
     
    zonzon, Jun 1, 2007 IP
  7. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thats what bigdump.php does
     
    inworx, Jun 3, 2007 IP
  8. bouncer69

    bouncer69 Peon

    Messages:
    978
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You can divided the sql file to multiple sql and upload it easily.
     
    bouncer69, Jun 5, 2007 IP