{"id":3564,"date":"2017-03-21T10:00:25","date_gmt":"2017-03-21T09:00:25","guid":{"rendered":"https:\/\/rephlex.de\/blog\/?p=3564"},"modified":"2017-03-22T09:27:00","modified_gmt":"2017-03-22T08:27:00","slug":"magento-database-import-errno-150","status":"publish","type":"post","link":"https:\/\/rephlex.de\/blog\/2017\/03\/21\/magento-database-import-errno-150\/","title":{"rendered":"Magento Database import: Errno 150"},"content":{"rendered":"<p>In case your\u00a0Magento database import fails with errno 150,\u00a0here&#8217;s\u00a0a quick solution:<\/p>\n<p>Put the following statements\u00a0on top of your import script:<\/p>\n<blockquote>\n<pre>SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\";\r\nSET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;\r\nSET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;\r\nSET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;\r\nSET NAMES utf8;\r\nSET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;\r\nSET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\r\nSET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';\r\nSET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;<\/pre>\n<\/blockquote>\n<p>Put the following statements at the end of your import\u00a0script:<\/p>\n<blockquote>\n<pre>SET SQL_MODE=@OLD_SQL_MODE;\r\nSET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\r\nSET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;\r\nSET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;\r\nSET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;\r\nSET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;\r\nSET SQL_NOTES=@OLD_SQL_NOTES;<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In case your\u00a0Magento database import fails with errno 150,\u00a0here&#8217;s\u00a0a quick solution: Put the following statements\u00a0on top of your import script: SET SQL_MODE=&#8220;NO_AUTO_VALUE_ON_ZERO&#8220;; SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=&#8217;NO_AUTO_VALUE_ON_ZERO&#8216;; SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0; Put the following statements at the end of your import\u00a0script: SET SQL_MODE=@OLD_SQL_MODE; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[267,57,142,266,212,268,265,40,263,264,269],"class_list":["post-3564","post","type-post","status-publish","format-standard","hentry","category-techtalk","tag-267","tag-database","tag-datenbank","tag-errno","tag-error","tag-foreign-key","tag-import","tag-linux","tag-magento","tag-mysql","tag-phpmyadmin"],"_links":{"self":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/comments?post=3564"}],"version-history":[{"count":2,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3564\/revisions"}],"predecessor-version":[{"id":3566,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3564\/revisions\/3566"}],"wp:attachment":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/media?parent=3564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/categories?post=3564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/tags?post=3564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}