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.

copy database in phpmyadmin ?

Discussion in 'MySQL' started by tapalapa, Mar 4, 2007.

  1. #1
    I have a 30mb database. I am creating a test site on a sub domain to try out a few upgrades of the script. How do i create a copy database or copy the current database to an empty one in phpmyadmin ? when i try one, i go to operations , then copy then put a database name, it gives me an error, saying the database already exist.


    I get the following when copying a database:

    Error

    SQL query:

    CREATE DATABASE `gunit_pimpjojo` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


    MySQL said:
    #1007 - Can't create database 'gunit_pimpjojo'; database exists
     
    tapalapa, Mar 4, 2007 IP
  2. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Download a sql file, then create a new database and dump into that one your sql file, but before doing that delete from the top the whole row that says "CREATE DATABASE"
     
    Your Content, Mar 4, 2007 IP
  3. sundaybrew

    sundaybrew Numerati

    Messages:
    7,294
    Likes Received:
    1,260
    Best Answers:
    0
    Trophy Points:
    560
    #3
    In the top of the database file you are trying to dump you will see that :

    CREATE DATABASE `gunit_pimpjojo` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    Just remove this from the dump ( Notepad or wherever you have the dump)

    Then re paste the file

    You just need to remove that line....and you will be good to go
     
    sundaybrew, Mar 4, 2007 IP