简体   繁体   中英

mysql import .sql dump using phpmyadmin

In PHPMyAdmin, I am trying to import a sqldump file which seems created using --quote-names. I get an error for the sql commands which have double quoted table names and fields names. How can I import the file im PHPMyAdmin?

Any help would be highly appreciated.

CREATE TABLE IF NOT EXISTS "articles" (
  "ar_id" int(10) unsigned NOT NULL,
  "ar_code" varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  "ar_group" int(10) unsigned NOT NULL DEFAULT '0',
  "ar_description" varchar(255) NOT NULL DEFAULT '',
  "ar_text" longtext NOT NULL,
  "ar_explanation" text NOT NULL,
  "ar_date" varchar(8) NOT NULL DEFAULT '',
  "ar_last_update" int(10) unsigned NOT NULL DEFAULT '0',
  "ar_creation_date" int(10) unsigned NOT NULL DEFAULT '0',
  "ar_update_user" varchar(15) NOT NULL DEFAULT '',
  PRIMARY KEY ("ar_id")
) AUTO_INCREMENT=317 ;

when I remove double qutes, the script working fine. The size of the file is about 600 MB

If PHPMyAdmin doesn't support it, restore to a local mySQL database and dump an importable version from there.

Set the SQL mode to ANSI : http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html#sqlmode_ansi_quotes

There is an option to change the SQL mode on the phpMyAdmin import page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM