Hi everyone,
i've created a database with a number of tables using phpMyAdmin. I'd like to use this particular database as a basis for a new database, ie. deleting some tables and adding others. Since I want to keep the original database intact, I've exported the original as a .sql file but I now need to save this version as a new version under a new database name and import it back into phpMyAdmin where I can edit it further.
The following is what part of the code looks like in the .sql file (ie. after I converted it to a .txt file so I could view it):
Can someone tell me how I can import the database back into phpMyAdmin under another name?
Appreciate any help.
i've created a database with a number of tables using phpMyAdmin. I'd like to use this particular database as a basis for a new database, ie. deleting some tables and adding others. Since I want to keep the original database intact, I've exported the original as a .sql file but I now need to save this version as a new version under a new database name and import it back into phpMyAdmin where I can edit it further.
The following is what part of the code looks like in the .sql file (ie. after I converted it to a .txt file so I could view it):
Code:
-- phpMyAdmin SQL Dump
-- version 2.11.7.1
-- [URL unfurl="true"]http://www.phpmyadmin.net[/URL]
--
-- Host: localhost
-- Generation Time: Jan 06, 2009 at 05:54 PM
-- Server version: 5.0.41
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `first_country_oam`
--
-- --------------------------------------------------------
--
-- Table structure for table `accessLevels`
--
CREATE TABLE `accessLevels` (
`AccessLevelID` int(11) NOT NULL auto_increment,
`AccessLevelName` varchar(50) default NULL,
PRIMARY KEY (`AccessLevelID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `accessLevels`
--
-- --------------------------------------------------------
--
-- Table structure for table `branches`
--
CREATE TABLE `branches` (
`BranchID` int(10) NOT NULL auto_increment,
`ClientNameFK` varchar(50) default NULL,
`BranchContactFirstname` varchar(50) default NULL,
`BranchContactLastname` varchar(50) default NULL,
`BranchAddress1` varchar(50) default NULL,
`BranchAddress2` varchar(50) default NULL,
`BranchSuburb` varchar(50) default NULL,
`BranchStateFK` varchar(50) default NULL,
`BranchPostcode` varchar(50) default NULL,
`BranchTel` varchar(25) default NULL,
`BranchFax` varchar(25) default NULL,
`BranchEmail` varchar(25) default NULL,
PRIMARY KEY (`BranchID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `branches`
--
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
CREATE TABLE `clients` (
`ClientID` int(10) NOT NULL auto_increment,
`ClientName` varchar(50) default NULL,
`ClientContactFirstname` varchar(50) default NULL,
`ClientContactLastname` varchar(50) default NULL,
`ClientAddress1` varchar(50) default NULL,
`ClientAddress2` varchar(50) default NULL,
`ClientSuburb` varchar(50) default NULL,
`ClientStateID` varchar(50) default NULL,
`ClientPostcode` varchar(50) default NULL,
PRIMARY KEY (`ClientID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `clients`
--
Can someone tell me how I can import the database back into phpMyAdmin under another name?
Appreciate any help.