Link to home
Start Free TrialLog in
Avatar of jonathanduane2010
jonathanduane2010

asked on

importing database using phpmyadmin

Hi Guys,

I am trying import a database into Php My Admin using step1.png (attached) and whhen i try and do it it gives me an error step2.png (attached) i have the .sql file i would like to attach (do i have to do anything with that before trying to upload?)

and the fact that its 7mb is that causing an issue?
step1.png
step2.png
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

First you have to create a database with the name you want, second you can import data without any problem.

Cheers
I'm not sure I know how to fix this, but I know that you must take a two-step approach to using MySQL.  First you must connect to the data base, and it look like you're OK there.  Next you must select the data base.  That's what appears to be missing.  I doubt that 7mb is any part of the problem.
In step1.jpg it seems you don't have selected the database yet.
Also, you can post here the first section  of your sql file: if in your sql file there is the mention to another database wothout the create statement, this can cause the issue.

I don't think the size of file is the problem.
Avatar of jonathanduane2010
jonathanduane2010

ASKER

will i open in in notepad++ and post it ???

like here?

- MySQL dump 10.13  Distrib 5.1.70, for unknown-linux-gnu (x86_64)
--
-- Host: localhost    Database: body_wp427
-- ------------------------------------------------------
-- Server version	5.1.70-cll

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `trt_commentmeta`
--

DROP TABLE IF EXISTS `trt_commentmeta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trt_commentmeta` (
  `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `meta_key` varchar(255) DEFAULT NULL,
  `meta_value` longtext,
  PRIMARY KEY (`meta_id`),
  KEY `comment_id` (`comment_id`),
  KEY `meta_key` (`meta_key`)
) ENGINE=MyISAM AUTO_INCREMENT=200 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `trt_commentmeta`
--

LOCK TABLES `trt_commentmeta` WRITE;
/*!40000 ALTER TABLE `trt_commentmeta` DISABLE KEYS */;
INSERT INTO `trt_commentmeta` (`meta_id`, `comment_id`, `meta_key`, `meta_value`) VALUES (180,1682,'is_customer_note','0'),(175,1674,'is_customer_note','0'),(176,1675,'is_customer_note','0'),(177,1676,'is_customer_note','0'),(178,1677,'is_customer_note','0'),(179,1681,'is_customer_note','0'),(169,1651,'is_customer_note','0'),(181,1683,'is_customer_note','0'),(184,1806,'is_customer_note','0'),(189,2591,'is_customer_note','0'),(166,1610,'is_customer_note','0'),(167,1612,'is_customer_note','0'),(165,1609,'is_customer_note','0'),(162,1560,'is_customer_note','0'),(161,1538,'is_customer_note','0'),(164,1583,'is_customer_note','0'),(163,1581,'is_customer_note','0'),(87,79,'_trt_trash_meta_status','0'),(172,1655,'is_customer_note','0'),(173,1662,'is_customer_note','0'),(137,1362,'is_customer_note','0'),(138,1363,'is_customer_note','0'),(139,1364,'is_customer_note','0'),(140,1378,'is_customer_note','0'),(183,1695,'is_customer_note','0'),(182,1694,'is_customer_note','0'),(143,1396,'is_customer_note','0'),(144,1397,'is_customer_note','0'),(145,1399,'is_customer_note','0'),(146,1409,'is_customer_note','0'),(147,1410,'is_customer_note','0'),(188,2486,'is_customer_note','0'),(187,2485,'is_customer_note','0'),(150,1442,'is_customer_note','0'),(151,1461,'is_customer_note','0'),(186,2459,'is_customer_note','0'),(185,2330,'is_customer_note','0'),(154,1480,'is_customer_note','0'),(155,1484,'is_customer_note','0'),(156,1491,'is_customer_note','0'),(157,1493,'is_customer_note','0'),(158,1494,'is_customer_note','0'),(159,1495,'is_customer_note','0'),(160,1496,'is_customer_note','0'),(170,1653,'is_customer_note','0'),(171,1654,'is_customer_note','0'),(174,1673,'is_customer_note','0'),(168,1647,'is_customer_note','0'),(190,2749,'is_customer_note','0'),(194,2753,'is_customer_note','0'),(192,2751,'is_customer_note','0'),(195,2754,'is_customer_note','0'),(196,2756,'is_customer_note','0'),(197,2758,'is_customer_note','0'),(198,2759,'is_customer_note','0'),(199,2760,'is_customer_note','0');
/*!40000 ALTER TABLE `trt_commentmeta` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `trt_comments`
--

DROP TABLE IF EXISTS `trt_comments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trt_comments` (

Open in new window


do i need to change the start of it?
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks Thomas

body_wp427 is the old database i want to import it to new database which is RPG19459_bodyfirstie2;
i keep getting this error message SQL query:

USE RPG19459_bodyfirstie2;


MySQL said: Documentation

#1044 - Access denied for user 'bodyfirstie2'@'%' to database 'RPG19459_bodyfirstie2'
Hi!

Then you can use the

use RPG19459_bodyfirstie2;

in line 17 as you already have created that database (as I have seen on your step1.png picture)

Regards,
   Tomas Helgi
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi!

You will need to give the user bodyfirstie2'@'%' necessary rights
in the Privilege link/tab
http://wiki.phpmyadmin.net/pma/user_management
 
Regards,
    Tomas Helgi