Home › Forums › BulletProof Security Pro › DB Backup: import error
- This topic has 5 replies, 2 voices, and was last updated 3 weeks, 5 days ago by
pdlc.
-
AuthorPosts
-
pdlc
ParticipantHi,
wordpress site up to date + woocommerce
DB Total Size is: 286.67 MB / 293,552 KB
MySQL DB Server Version: 10.6.22-MariaDBProblem when importing my backup created with the DB Backup tool: ERROR 1064 (42000). The .sql dump is not correct, quotes are missing around some variables:
Incorrect :
INSERT INTOwp_wc_product_meta_lookup
( product_id, sku, virtual, downloadable, min_price, max_price, onsale, stock_quantity, stock_status, rating_count, average_rating, total_sales, tax_status, tax_class, global_unique_id )
VALUES ( 17, ‘TSANJFRO’, 0, 0, 4.2000, 4.2000, 0, 45, ‘instock’, 0, 0.00, 1537, ‘taxable’, ”, ” );Correct :
INSERT INTOwp_wc_product_meta_lookup
(product_id
,sku
,virtual
,downloadable
,min_price
,max_price
,onsale
,stock_quantity
,stock_status
,rating_count
,average_rating
,total_sales
,tax_status
,tax_class
,global_unique_id
) VALUES (17, ‘TSANJFRO’, 0, 0, 4. 2000, 4.2000, 0, 45, ‘instock’, 0, 0.00, 1537, ‘taxable’, ”, ”),How can I solve this problem? (apart from making backups with phpmyadmin)
best regard,Monica
AITpro Admin
KeymasterYeah that is odd. The BPS DB Backup code adds single quotes to all DB Values when it writes the .sql backup file. Use PhpMyAdmin and check your database to see what values are in wp_wc_product_meta_lookup database table. My guess is the values have some additional characters like unescaped double quotes. Let me know what you see.
AITpro Admin
KeymasterI took a look at a website that I manage that has WooCommerce on it and checked the wc_product_meta_lookup database table and see standard number values without any unusual characters. So the BPS DB backup code is not handling these number values correctly. Will need to fix this. For now just do a PhpMyAdmin dump/backup.
pdlc
ParticipantThank you for your reply.
In the PhpMyAdmin dump, there are single quote around the name of the table ‘wp_wc_product_meta_lookup’ and around its fields. In BPS Pro’s dump, however, the single quote around the fields are absent, generating an error when the DB is imported.BPS Pro’s DUMP is much heavier than PhpMyAdmin’s: 116 MB vs. 271 MB. In fact, when inserting values into the database, BPS Pro will write :
INSERT INTO
wp_wc_product_meta_lookup
( product_id, sku, virtual, downloadable, min_price, max_price, onsale, stock_quantity, stock_status, rating_count, average_rating, total_sales, tax_status, tax_class, global_unique_id )
VALUES ( … )as many times as there are values to insert…
Best regards,
MonicaAITpro Admin
KeymasterYep, BPS DB Backup uses loops instead of the mysqldump command (what PhpMyAdmin uses) since the PHP exec() function is required to run mysqldump in PHP code, which is very dangerous and usually disabled by default on web hosts. With that said, the BPS loops can be improved to reduce DB backup size.
pdlc
ParticipantI checked the other backups generated by BPS pro for my other websites and discovered that 2 of them show an error on import:
ERROR 1367 (22007). -
AuthorPosts
- You must be logged in to reply to this topic.