1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem restoring MySQL that I moved from another server

Discussion in 'MySQL' started by GreatWebSuccess, Jun 14, 2008.

  1. #1
    I had to move all my websites from 1 server to another, so I went in and quickly did a MySQL backup through phpmyadmin.

    I"ve been trying to restore the database for a few days but I keep getting this error message:

    Error
    SEMrush
    SQL query:

    --
    -- Database: `danny17_grfxmem`
    --
    CREATE DATABASE `danny17_grfxmem` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

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


    danny17 used to be the username for the host on the other server, and xziler8r is on the new one. I was thinking about going into the backup file and renaming danny17 to xziler8r, but doing it through notepad it would crap out on me and move really slow. the sql file is about 3.4MB big so i dont think its that huge.

    Any ideas?
     
    GreatWebSuccess, Jun 14, 2008 IP
    SEMrush
  2. mwasif

    mwasif Active Member

    Messages:
    818
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Remove CREATE DATABASE and USE danny17_grfxmem commands from sql file. Then create the database manually and import the data into new database.
     
    mwasif, Jun 15, 2008 IP
  3. mwasif

    mwasif Active Member

    Messages:
    818
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #3
    Here are the detailed instructions to perform this action.

    1. Delete this line from your sql file.
    CREATE DATABASE `danny17_grfxmem` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    2. And make sure you have not SQL command
    USE `danny17_grfxmem`;
    or
    USE danny17_grfxmem;
    in the sql file. If there is then delete this line too and save the file.


    3. Create a new database with the name xziler8r_grfxmem

    4. Use phpmyadmin to import the data from updated file to database xziler8r_grfxmem.
     
    mwasif, Jun 15, 2008 IP
  4. JoomlaHackers.Net

    JoomlaHackers.Net Banned

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You must be doing some mistake.
    Well,if you want,i can do it for you..
    Pm me now.
     
    JoomlaHackers.Net, Jun 15, 2008 IP
  5. GreatWebSuccess

    GreatWebSuccess Peon

    Messages:
    226
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    When I create the new database, what commands do I type in the sql box to import the database?

    I removed all the lines that you mentioned, create database, default character set and use (username) and saved the file again.

    I tried importing it but it sat there for 30 min and didnt do anything
     
    GreatWebSuccess, Jun 15, 2008 IP
  6. GreatWebSuccess

    GreatWebSuccess Peon

    Messages:
    226
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nevermind, got it working
     
    GreatWebSuccess, Jun 15, 2008 IP
  7. mwasif

    mwasif Active Member

    Messages:
    818
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #7
    What was the issue?
     
    mwasif, Jun 18, 2008 IP
  8. lordadel

    lordadel Active Member

    Messages:
    1,035
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    90
    #8
    I think that the best way to import SQL database is by using Bigdump it's really very easy to use and do the job needed effeciently
    you can google it
     
    lordadel, Jun 18, 2008 IP
  9. GreatWebSuccess

    GreatWebSuccess Peon

    Messages:
    226
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I deleted the lines:

    1. Delete this line from your sql file.
    CREATE DATABASE `danny17_grfxmem` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    2. And make sure you have not SQL command
    USE `danny17_grfxmem`;
    or
    USE danny17_grfxmem;
    in the sql file. If there is then delete this line too and save the file

    and then went through the backup sql file and removed the tables/database that I didnt need, and did that manually.

    It was really simple actually heh
     
    GreatWebSuccess, Jun 18, 2008 IP
  10. Bohol

    Bohol Peon

    Messages:
    2,680
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Big Dump is such a big help for transferring databases more than 50MB big. This is the same tool recommended by someone in AdminZone and SMF Forum Help.
     
    Bohol, Jun 20, 2008 IP
    lordadel likes this.