I am not sure where you got that export code but I don’t see the PRIMARY KEY
defined as it should be. Take a look at the code from Core that creates the table:
87 CREATE TABLE $wpdb->commentmeta (
88 meta_id bigint(20) unsigned NOT NULL auto_increment,
89 comment_id bigint(20) unsigned NOT NULL default '0',
90 meta_key varchar(255) default NULL,
91 meta_value longtext,
92 PRIMARY KEY (meta_id),
93 KEY comment_id (comment_id),
94 KEY meta_key (meta_key($max_index_length))
95 ) $charset_collate;
Take a look at line 92. That is missing from your “create” statement.
Related Posts:
- Inserting Post Meta From SQL
- What causes the “max_user_connections” warning on WordPress frontend?
- Error establishing a database connection – with Debug Data
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Size article thumbnails and retrieve them directly from database
- wpdb_prepare with multiple or condition
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- Error establishing database connection – high traffic?
- Create table from array with prepare
- Trouble Migrating all data blog from WordPress.com to WordPress.org
- How to fix database error duplicate entry
- Why this query is not showing any result on wordpresss home page?
- Why does changing Database Table Prefixes result in loss of content?
- SQL query to set posts in bulk based on the post content
- $wpdb->get_var – What value is returned when zero records are found?
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- SQL database import #1046 error
- How to create index (sql) to a meta_key?
- The function is deprecated; use mysql_real_escape_string() instead
- Delete all users meta that named: user_avatar
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- Hang Up Followed By Can’t select database
- Print output of Table Creation
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- export individual posts to text files or a single csv file
- SQL query : Select a thumbnail for a media
- why you don’t Implement PDO for access every thing to database
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- difference between primary key and unique key
- phpMyAdmin – Error > Incorrect format parameter?
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- Get error messages when $wpdb->insert() returns false?
- Reset Post IDs to less than 64bit integer
- WordPress database scalability from the code perspective
- Does WordPress use the InnoDB engine for MySQL by default?
- $wpdb->prepare() warning in WordPress 3.5
- Sharing database for collaborative development
- Split WP install between 2 databases?
- Why does dbDelta() not catch MysqlErrors?
- Is altering a default WordPress database table update safe?
- $wpdb variable throw this error Call to a member function get_results() on a non-object in
- what to do when your WordPress database is too large?
- Change all http to https in mysql databse?
- WordPress and automated MySQL backups to a different host
- Scheduling posts in database
- error establishing a database connection
- Error: SELECT SQL_CALC_FOUND_ROWS
- WordPress mysql table double prefixes
- WordPress database import: Row size too large
- Advanced SELECT query with condtional statements
- $wpdb doesn’t like to store arrays
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Export / import WordPress database
- Improve performance by removing unnecessary database queries
- Redirecting to old domain after migration website
- Catalina an MAMP Database Conenction Error
- WordPress Database Huge wp_usermeta Table
- A MySQL DB within a MySQL DB
- Switching Databases in LocalHost
- Is there a way to recover the table wp_term_relationships?
- Unable to set a default serialized array using dbdelta()
- Insert Query not working in the form
- Problems with moving my WordPress site to another domain/server
- Problem in using wpdb
- How can I restrict php mail() to only send me one email after a db error
- pull data from a remote wordpress database
- Clear Terms from Taxonomy for Specific Post IDs?
- Options on how to Display member specific data from a MS SQL database
- WP MultiSite: Can’t select database error after changing to new domain
- How to connect and insert data in database of wordpress?
- Buddypress avatar image in database [closed]
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- Installing local to live WP into subdirectory
- WordPress SQL – How to Check for Category?
- Only allow user to access a link once a year, based on their joining date
- Error establishing a database connection in wordpress site , website not opening
- Counting post and changing roles in mysql database. Query not code
- MSQL database wp_postmeta has meta key tve_revision
- Deleting empty meta key values
- “BS_” rows in postmeta table
- What’s the easiest way to connect external database and display data on wordpress?
- mySQL database size large, but tables size less
- After renaming MySQL database, I can no longer access my Blog page
- How To connect to the same WordPress database with different database user
- Possible to restore wordpress database from mysql56 and sqlite files?
- can’t delete a row from post_meta table
- Create a new table on the database and save parameters from a contact form
- How to add data from wordpress tables to new database tables you have created
- Install WordPress with SQL database
- How to back-up a database on IIS
- SQL query to rewrite all media URLs to end with .webp
- Weird WP -Cli Error Connection Refused
- How to find fresh (last modified) and sql backup?