How to upload a database??

Discussion in 'MySQL' started by janina, Jul 15, 2009.

Thread Status:
Not open for further replies.
  1. #1
    hey freinds ,
    can anyone tell me how to upload a database?
    actually i have a web directory site, now i have changed my hosting and back up my database..
    but now when i am uploading the database, a SQL error is coming :(
    Please can anyone tell me the proper procedure to do..

    Sorry, if wrong section
     
    janina, Jul 15, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    You have to upload the sql file in phpmyadmin
     
    Bohra, Jul 15, 2009 IP
  3. janina

    janina Banned

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    see,
    i am doing like this
    1st going to phpmyadmin
    then import then select that file then go...
    and after that i am getting that err.....
     
    janina, Jul 15, 2009 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    Whats the error
     
    Bohra, Jul 15, 2009 IP
    sawz likes this.
  5. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #5
    how big is the database, if its too big phpmyadmin just won't do it.

    this belongs in databases so i'll move it.
     
    sawz, Jul 15, 2009 IP
  6. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Echoing the "what error are you receiving" request as well.

    And just in case if it is over a meg or two in size, do you have root or ssh access to do it from the command line?

    Best solution would be to upload it as a normal file to your webspace, drop your host an email and ask them to import it into the specific database that you need it in. They should be able to import it if the file is too large for phpmyadmin.
     
    theapparatus, Jul 15, 2009 IP
    sawz likes this.
  7. janina

    janina Banned

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Error

    SQL query:

    --
    -- Database: `information_schema`
    --
    CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    MySQL said: Documentation
    #1044 - Access denied for user 'newgamez'@'localhost' to database 'information_schema'
     
    janina, Jul 15, 2009 IP
  8. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #8
    Open your databese file in notepad

    Find and remove this line

    CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    Code (markup):
    after that save it and try to import it after that it will work
     
    Bohra, Jul 15, 2009 IP
  9. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #9
    if you can open that sql file in a text editor, at the top, remove everything up to Create Table.

    its reading off the old host.

    so how big is this database?


    damn, too slow again. :D
     
    sawz, Jul 15, 2009 IP
  10. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Something's wrong here. 'information_schema' is an internaly used CPanel database. That shouldn't be exported here and used.
     
    theapparatus, Jul 15, 2009 IP
  11. janina

    janina Banned

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    it is 253 kb
     
    janina, Jul 15, 2009 IP
  12. jbrooksuk

    jbrooksuk Active Member

    Messages:
    127
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #12
    Wrong quote there.

    If you understand MySQL, then take a quick look through and see what's happening.

    If you're willing to pay to get the problem fixed, I'd be interested.
     
    jbrooksuk, Jul 15, 2009 IP
  13. elitesystem

    elitesystem Well-Known Member

    Messages:
    1,360
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    150
    #13
    do what sawz said.. that should work.. you can google the error ofcourse :)
     
    elitesystem, Jul 15, 2009 IP
  14. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #14
    lol this time i was first :D lol thanks for the rep cant rep u back unlike u i have a daily rep giving quota and mines over :p
     
    Bohra, Jul 15, 2009 IP
  15. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #15
    nice catch, i didn't even think about that. :D
     
    sawz, Jul 15, 2009 IP
Thread Status:
Not open for further replies.