Import DB in XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Import DB in XAMPP

Postby demirk » 14. September 2015 17:19

Hi everybody,
i'm newbie and I make a disaster. I work for days to a project offline, and I accidentally deleted the db on xampp.
Is there a way to rescue it?
I exported the db (.sql) before the disaster, but I'm not able to re-import it in xampp!

This is the error log

phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Creato il: Set 11, 2015 alle 17:52
-- Versione del server: 5.6.25
-- Versione PHP: 5.6.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
Messaggio di MySQL: Documentazione

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 1' at line 1

Thank you so much for your support!
demirk
 
Posts: 2
Joined: 14. September 2015 15:02
Operating System: Windows

Re: Import DB in XAMPP

Postby Altrea » 14. September 2015 17:25

Hi demirk,

demirk wrote:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'phpMyAdmin SQL Dump

MySQL has no clue what to do with the line
Code: Select all
phpMyAdmin SQL Dump


Either comment this line out by placing a -- in front of it or delete the entire line.
After that retry to import your dump.
If it still is not successful the error message will change to spot the new problem.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Import DB in XAMPP

Postby demirk » 17. September 2015 13:57

Many many thank you! After some errors I finally solve the problem!
Just a question, it works only if I create a new database. What I must do if I want to import it on an existing db?
(For example in altervista, where I have only a db and I can't create a new one)

I changed the name of database on the sql but appears this error: #1046 - No database selected
demirk
 
Posts: 2
Joined: 14. September 2015 15:02
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 121 guests