• Resolved mmesarina

    (@mmesarina)


    Hi, I am using WordPress Duplicator to package a website I have in a third party host and I am extracting the package in my local machine. Everything went fine, no errors, except that i couldn’t login and i then noticed that neither the wp_users nor wp_posts and other tables were copied in the new database on the local machine. So I looked at the installer-data.sql file and I noticed that at some point in the file the mySQL commands text color change into the comment color in Sublime 3 editor. I took a closer look and i noticed that, the commands that were commented were exactly those that created wp_users and wp_posts.
    And I noticed that the commented section started after a the \’ was used inside the double quotes of an INSERT statement. Since I read that one doesn’t need to scape single quotes when one is using double quotes in mySQL, I deleted the backward slash (\) , and voila, the commented parts were recognized as mySQL commands. But that was not the only \’ sequence in the file , there were others, and I did a replace all , but that didn’t solve the whole problem. There is still a small section that appears as ‘commented section’ when in fact it should be detected as mySQL commands. So I think there must be some problem with the use of double quotes and single quotes that MySQL is not liking. I am using Mysql 5.7.15 .
    Let me know if someone finds a workaround thanks

    -Malena

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Malena,

    I haven’t ever seen that scenario. Are you using PHP mode or mysqldump (see settings > packages tab)?

    Thanks

    Thread Starter mmesarina

    (@mmesarina)

    Hi Cory,
    I am not using PHP mode or mysqldump. I followed the instructions from the video tutorials in the Duplication website.
    But I did some more sleuthing and found the following error messages in the installer-log.txt that point to invalid values for dates and also NULL values for dates. So some of the main tables like 041_users and 041_posts are not created because of these errors. Here is the section of the installer-log.text with these errors.
    Any idea what for example this error is referring to:

    **ERROR** database error write ‘Invalid default value for ‘created”

    thank you

    -Malena

    DATABASE ENVIRONMENT
    ————————————–
    MYSQL VERSION: This Server: 5.7.15 — Build Server: 5.6.32
    FILE SIZE: database.sql (6.23MB) – installer-data.sql (6.23MB)
    TIMEOUT: 5000
    MAXPACK: 4194304
    SQLMODE: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    NEW SQL FILE: [/Users/malena/Sites/stellarpeers/installer-data.sql]
    ————————————–
    DATABASE RESULTS
    ————————————–
    **ERROR** database error write ‘Invalid default value for ‘comment_date” – [sql=
    CREATE TABLE 041_comments (
    comment_ID bigint(20) unsigned NOT NULL …]
    **ERROR** database error write ‘Invalid default value for ‘created” – [sql=
    CREATE TABLE 041_duplicator_packages (
    id bigint(20) unsigned NOT NU…]
    **ERROR** database error write ‘Invalid default value for ‘link_updated” – [sql=
    CREATE TABLE 041_links (
    link_id bigint(20) unsigned NOT NULL AUTO_I…]
    **ERROR** database error write ‘Invalid default value for ‘timestamp” – [sql=
    CREATE TABLE 041_pmpro_membership_orders (
    id int(11) unsigned NOT N…]
    **ERROR** database error write ‘Invalid default value for ‘post_date” – [sql=
    CREATE TABLE 041_posts (
    ID bigint(20) unsigned NOT NULL AUTO_INCREM…]
    **ERROR** database error write ‘Invalid default value for ‘upload_date” – [sql=
    CREATE TABLE 041_rt_rtm_media (
    id bigint(20) NOT NULL AUTO_INCREMEN…]
    **ERROR** database error write ‘Invalid default value for ‘registered” – [sql=
    CREATE TABLE 041_signups (
    signup_id bigint(20) NOT NULL AUTO_INCREM…]
    **ERROR** database error write ‘Invalid default value for ‘member_since” – [sql=
    CREATE TABLE 041_swpm_members_tbl (
    member_id int(12) NOT NULL AUTO_…]
    **ERROR** database error write ‘Invalid default value for ‘txn_date” – [sql=
    CREATE TABLE 041_swpm_payments_tbl (
    id int(12) NOT NULL AUTO_INCREM…]
    **ERROR** database error write ‘Invalid default value for ‘created” – [sql=
    CREATE TABLE 041_teambooking_promotions (
    id int(11) NOT NULL AUTO_I…]
    **ERROR** database error write ‘Invalid default value for ‘created” – [sql=
    CREATE TABLE 041_teambooking_reservations (
    id int(11) NOT NULL AUTO…]
    **ERROR** database error write ‘Invalid default value for ‘date” – [sql=
    CREATE TABLE 041_tg_item_elements (
    id mediumint(9) NOT NULL AUTO_IN…]
    **ERROR** database error write ‘Invalid default value for ‘date” – [sql=
    CREATE TABLE 041_tg_item_skins (
    id mediumint(9) NOT NULL AUTO_INCRE…]
    **ERROR** database error write ‘Invalid default value for ‘user_registered” – [sql=
    CREATE TABLE 041_users (
    ID bigint(20) unsigned NOT NULL AUTO_INCREM…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=
    /* INSERT TABLE DATA: 041_bp_notifications */
    INSERT INTO `041_bp_notifica…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“2”, “3”, “8172”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“3”, “3”, “8177”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“4”, “3”, “8206”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“5”, “3”, “8240”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“6”, “3”, “8251”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“7”, “3”, “8271”, “-1”, “social_a…]
    **ERROR** database error write ‘Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_notified’ at row 1′ – [sql=INSERT INTO 041_bp_notifications VALUES(“8”, “3”, “8281”, “-1”, “social_a…]

    Thread Starter mmesarina

    (@mmesarina)

    I also noticed that the installer-data.sql is entering values for datetime values as ‘0000-00-00 00:00:00’ , but the slq_mode of the database has the values ” STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,
    and from what I am reading NO_ZERO_DATE is saysing that 0 values for datetime are not allowed.
    Also why are all datetime values in the installer-data.sql ‘0000-00-00 00:00:00, they should not be. These should be the datetime values from the original database that I am copying and they are not ‘0000-00-00 00:00:00’.
    I think this may be what is causing all these errors.

    thanks

    -Malena

    Hi @mmesaria,

    When you build a package it has to use either PHP or mysqldump those are the only two options. As to why the dates are not getting built correctly when the package is made I’m not sure, I haven’t really see that from the build side before.

    The sql_mode values are all set by your server, if you don’t set them then they will default to the servers settings. If you want to modify it you can in step 2 under options see the Mode setting. If your still having issues feel free to submit a support issue and refer to this thread and I can dig into it a little deeper for you…

    Thanks~

    Thread Starter mmesarina

    (@mmesarina)

    Hi Cory, I used the PHP option when i package the remote site with duplicator. I thought i should try the mysqldump to see if things change, and yes, now the site is being unpacked perfectly on my local machine. When I looked at the PHP mode option this time it said something about a max limit to query size. So I am not sure but maybe that was related to my issue. But thing work using ‘mysqldump’. Thank you for your prompt response, it really helped me to get this working by trying new options. Awesome tool, duplicator!

    -Malena

    Thanks for the update!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘installer-data.sql – some sections commented out, some tables don’t get create’ is closed to new replies.