Errors when importing MySQL from UpdraftPlus

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
bunnerbob
Posts: 4
Joined: Fri Aug 20, 2021 4:21 am

Errors when importing MySQL from UpdraftPlus

Post by bunnerbob »

I have been attempting to restore backups generated by the WordPress plugin UpdraftPlus.

When I do I get errors, no matter how I do it. This happens if I use Sequel Ace or phpMyAdmin or the command line.

Here's the full comms with UpdraftPlus: https://updraftplus.com/forums/topic/multiple-problems/

But the short version is that UpdraftPlus adds conditional comments in the backup and the version of MySQL that MAMP uses can't seem to handle those.

The folks at Updraft installed MAMP and tried it themselves, and got the same errors. They switched to another non-MAMP stack and did not get the errors.

Is there a known solution to this?

Note this does not seem to occur with phpMyAdmin-generated backups, or those generated by WP Migrate DB.

It looks like I'm running MySQL 5.7.32. I haven't changed this since I started working with MAMP Pro.

Thanks!

- Bob
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

Re: Errors when importing MySQL from UpdraftPlus

Post by mampsupportmod »

Want to share the errors?
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
bunnerbob
Posts: 4
Joined: Fri Aug 20, 2021 4:21 am

Re: Errors when importing MySQL from UpdraftPlus

Post by bunnerbob »

[ERROR in query 12] Invalid default value for ‘user_registered’
[ERROR in query 13] Table ‘micro_test.wp_mic_users’ doesn’t exist
[ERROR in query 18] Invalid default value for ‘scheduled_date_gmt’
[ERROR in query 19] Table ‘micro_test.wp_mic_actionscheduler_actions’ doesn’t exist
[ERROR in query 21] Invalid default value for ‘date_created_gmt’
[ERROR in query 26] Invalid default value for ‘log_date_gmt’
[ERROR in query 27] Table ‘micro_test.wp_mic_actionscheduler_logs’ doesn’t exist
[ERROR in query 31] Invalid default value for ‘comment_date’
[ERROR in query 46] Invalid default value for ‘timestamp’
[ERROR in query 47] Table ‘micro_test.wp_mic_itsec_logs’ doesn’t exist
[ERROR in query 48] Table ‘micro_test.wp_mic_itsec_logs’ doesn’t exist
[ERROR in query 49] Table ‘micro_test.wp_mic_itsec_logs’ doesn’t exist
[ERROR in query 50] Table ‘micro_test.wp_mic_itsec_logs’ doesn’t exist
[ERROR in query 51] Table ‘micro_test.wp_mic_itsec_logs’ doesn’t exist
[ERROR in query 63] Invalid default value for ‘link_updated’
[ERROR in query 89] Invalid default value for ‘post_date’
[ERROR in query 90] Table ‘micro_test.wp_mic_posts’ doesn’t exist
[ERROR in query 91] Table ‘micro_test.wp_mic_posts’ doesn’t exist
[ERROR in query 92] Table ‘micro_test.wp_mic_posts’ doesn’t exist
[ERROR in query 93] Table ‘micro_test.wp_mic_posts’ doesn’t exist

Note this was a standard WP install. You can see the problems all seem to happen on dates.

I was able to get around it by adding this at the beginning of the Updraft backup:
SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;

(This line was included in a backup exported from phpMyAdmin, but not in the Updraft backup)


Updraft support said exactly this:

"I’ve installed MAMP and tried the command line and I was able to reproduce the issue, I then tried Sequel Pro again and got the same issue.

Disabling MAMP and swapping to another stack I no longer get the issue and Sequel Pro works for me once again.

So the issue appears to be with the MySQL install provided by MAMP, I’m not sure why it doesn’t read and run the conditional comments as the version provided should be high enough to run them.

I think you should contact MAMP support and ask them why this is happening."
Post Reply