Viewing 13 replies - 1 through 13 (of 13 total)
  • Piotro

    (@piotrpomorski)

    refresh phpMyAdmin and check again base uni.
    For me, this query has gone through without a hitch
    or
    delete base and try again:

    
    CREATE TABLE <code>wp_commentmeta</code> 
    (<code>meta_id</code> bigint(20) UNSIGNED NOT NULL,
        <code>comment_id</code> bigint(20) UNSIGNED NOT NULL DEFAULT '0',
        <code>meta_key</code> varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        <code>meta_value</code> longtext COLLATE utf8mb4_unicode_ci)
        ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    
    • This reply was modified 6 years, 11 months ago by Piotro.
    Thread Starter hamadesign

    (@hamadesign)

    Thanks Piotro (@piotrpomorski),
    I’ve tried many times as you told me, but the same problem is happening ??

    • This reply was modified 6 years, 11 months ago by hamadesign.
    Piotro

    (@piotrpomorski)

    base uni is empty?

    Thread Starter hamadesign

    (@hamadesign)

    Yes it’s empty

    Hi @hamadesign,

    If you export your database make sure your “Add DROP TABLE / VIEW / PROCEDURE / FUNCTION” is enabled.
    This will make sure the table is dropped first before importing the new one.

    Let me know if this solved your issue.

    Thread Starter hamadesign

    (@hamadesign)

    Thanks helldog2018 (@helldog2018),

    I really don’t have an idea what is “Add DROP TABLE / VIEW / PROCEDURE / FUNCTION” and how to do that.

    As I said earlier, my database “uni”, which I wanted to import to, is empty.

    Hi @hamadesign,

    I suppose you installed a new WordPress, eventhough it is a complete new and clean install, it will place tables (empty ones) inside your database.

    What I am proposing is to enable the function to delete already existing tables if the tablename is exactly the same (in this case wp_commentmeta).

    What you can also try to do is manually remove the empty wp_commentmeta table and then import your database inside the new one. Then it atleast can’t tell you that this table already exists.

    It will probably then come with the same issue, only then for the wp_comments table. Because the wp_commentsmeta table is the first table being created after WordPress install (check THIS).

    Let me know if this fixed your problem.

    • This reply was modified 6 years, 11 months ago by helldog2018.

    Also check THIS page to learn how to activate ‘drop table if exists’ when you are firstly exporting your database.
    This newly exported database should be imported inside your new database.

    • This reply was modified 6 years, 11 months ago by helldog2018.
    Thread Starter hamadesign

    (@hamadesign)

    Again, thanks very much helldog2018 (@helldog2018).

    I’ve tried to export the original database without the table “wp_commentmeta”.

    When I tried to upload the database to the new one, I got this message:

    “You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit”.

    What a problem!

    Hi @hamadesign,

    This is due to php settings, they restrict to a certain size.
    Add the following to your .htaccess

    php_value upload_max_filesize 120M //file size
    php_value post_max_size 120M
    php_value max_execution_time 200
    php_value max_input_time 200

    Then try to import the database again.
    If succesfull remove the code again.

    Cheers.

    Thread Starter hamadesign

    (@hamadesign)

    I really appreciate your great help helldog2018 (@helldog2018).

    Thank you isn’t enough. If there is a better way to thank you, kindly tell me ??

    Dion

    (@diondesigns)

    First, this database cannot be imported into one that already contains WordPress tables with the default wp_ table prefix. Please create a new database in phpMyAdmin, and then import your old database into the one you just created.

    Second, modern Apache installations do not load PHP as a shared object, they use a FastCGI handler such as PHP-FPM. If this is the case here, then adding those values in .htaccess will result in HTTP 500 errors and blank pages.

    Thread Starter hamadesign

    (@hamadesign)

    Thank you DionDesigns (@diondesigns).

    I did that before. I’ve created a new database in phpMyAdmin and then imported the old database into the one you I created.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Error (SQL query) while importing database in Php My Admin’ is closed to new replies.