2016-07-29 12 views
-1

Ich habe ein Problem, das ein Export von PHPMyAdmin nicht erneut importieren wird. Es hat etwas mit einer Kombination aus einem gestrichenen einfachen Zitat und einem   Charakter zu tun. Ich habe es auf die folgenden reduziert:Export von PHPMyAdmin wird nicht importiert

CREATE TABLE `test` (
    `id` int(11) NOT NULL, 
    `text` text NOT NULL, 
    `text2` text NOT NULL 
) ENGINE=MyISAM DEFAULT CHARSET=latin1; 

Ohne entkam Apostroph, aber mit einer  :

INSERT INTO `test` (`id`, `text`, `text2`) VALUES (108, 'Whats new for local authorities?', ' '); 

WORKS OK

Mit einem entflohenen Apostroph, aber keine  

INSERT INTO `test` (`id`, `text`, `text2`) VALUES (108, 'What\'s new for local authorities?', ''); 

FUNKTIONIERT OK

Aber mit beide:

INSERT INTO `test` (`id`, `text`, `text2`) VALUES (108, 'What\'s new for local authorities?', ' '); 

schlägt mit:

Static analysis: 

1 errors were found during analysis. 

Ending quote ' was expected. (near "" at position 100) 
SQL query: 

INSERT INTO `test` (`id`, `text`, `text2`) VALUES (108, 'What\'s new for local authorities?', '&nbsp 

MySQL said: Documentation 

#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 ''&nbsp' at line 1 

Dies ist wahrscheinlich meine Unwissenheit, aber ich habe den Export und großen DBs seit Jahren ohne Probleme importieren.

Jede Hilfe, dankbar erhalten.

Dank

+0

Mögliche Duplikat zu importieren [Fehler während große SQL-Datei in MySQL Import] (http://stackoverflow.com/questions/38583500/error -waheimport-large-sql-file-in-mysql) – e4c5

Antwort

0

versuchen, die Daten von mysql.exe

mysql -uuser -ppass dbName < file.sql 
+0

Das funktioniert gut .... so ist es ein PHPMyAdmin/PHP-Problem? –

+0

PHPMyAdmin importiert manchmal nicht dieselben Daten, die es exportiert. – Michal

+0

PHPMyAdmin doenst behandelt entkommene Zeichen so gut, obwohl es sie in diesem Format exportiert. – MrX