我正在将php / mysql网站从一个托管迁移到另一个托管。当我将数据库导出为sql文件,然后将其导入新服务器时,一切都很好。但是问题是我的产品表中的Blob类型列很少。因此,导入后这些列中的某些行在phpmyadmin表视图中显示中文字符,而不是正确的内容。其他所有行都为空或显示尖括号。
请注意,导出时我选择了“对BLOB使用十六进制”选项。
导出文件中的示例sql查询如下所示。
INSERT INTO `tbl_product` VALUES(227, 'GR-112', 'Heart Healthy Floral Dried Fruit Gift Tray', 0x3c703e546869732064727920667275697420617272616e67656d656e7420696e636c75646573206472696564207072756e65732c206170706c65732c206b6977692c2061707269636f74732c20706c756d732c20706561727320616e64206372616e626572726965732e266e6273703b4f75722064726965642066727569742067696674207472617973206172652068616e64206372616674656420616e642064656c6967687466756c6c7920617272616e6765642e2053747566666564207769746820746865206d6f73742064656c6963696f757320616e64206672657368657374206472696564206672756974732e3c2f703e, 0x3c756c3e0a203c6c693e5072756e65732028386f7a293c2f6c693e0a203c6c693e4170706c65732028356f7a293c2f6c693e0a203c6c693e4b6977692028346f7a293c2f6c693e0a203c6c693e41707269636f7473202831306f7a293c2f6c693e0a203c6c693e506c756d732028326f7a293c2f6c693e0a203c6c693e50656172732028322e356f7a293c2f6c693e0a203c6c693e4372616e6265727269657320282e356f7a293c2f6c693e0a3c2f756c3e0a0a3c703e266e6273703b3c2f703e0a0a3c756c3e0a203c6c693e3c7374726f6e673e4b6f73686572207e204f4b2050617276653c2f7374726f6e673e3c2f6c693e0a3c2f756c3e, 0, 1, '', 0x3c756c3e0a203c6c693e54686973206974656d20697320696e2073746f636b20616e6420617661696c61626c6520746f20736869702e3c2f6c693e0a203c6c693e5374616e64617264205553412044656c6976657279202d2024392e39393c2f6c693e0a203c6c693e3c7374726f6e673e446973636f756e746564205368697070696e67202d2024332e39393c2f7374726f6e673e0a203c756c3e0a20203c6c693e43686f6f7365202671756f743b53686970204e6f772671756f743b206f7074696f6e2061742064656c69766572792064617465206f7074696f6e2e3c2f6c693e0a203c2f756c3e0a203c2f6c693e0a203c6c693e5368697073207468726f7567686f757420746865205553412026616d703b2043616e6164613c2f6c693e0a3c2f756c3e, 'img_5931479849384.jpg', '', '', NULL, NULL, 'img_5931479849384.jpg', 29.95, 477, 0, '0', 0.00, 0, 0, '0000-00-00', 9.99, 18.95, 1, 3.99, 18.95, 'This delicious, yet heart-healthy, dry fruit arrangement is the perfect gift for any occasion. Browse our line of delightfully arranged dried fruit trays now.', 'Dry Fruit Arrangement | Dried Fruit Trays Gifts', '', 'products/gift-trays/heart-healthy-floral-dried-fruit-gift-tray-1', 'heart-healthy-floral-dried-fruit-gift-tray-2', 0, 0, 0, 0, 0, NULL, '', '', 0, 0, 0, 0, 0, 0, '12:00:00', '12:00:00', 0, 0, 26, 1, 0, '2016-07-14 01:16:00', '2018-12-24', 15);
您可以看到第4列。这是一种斑点类型。