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
- #1067 – Invalid default value for ‘post_date’ when trying to create a new column
- Deleting WordPress posts and media files based on author via MYSQL database
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- What is “Advanced” SQL?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Case statement in MySQL
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- How do I restore a dump file from mysqldump?
- MySQL SELECT increment counter
- Error Code: 2013. Lost connection to MySQL server during query
- how to drop partition without dropping data in MySQL?
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- Creating a search form in PHP to search a database?
- Oracle SQL query for Date format
- phpMyAdmin – Error > Incorrect format parameter?
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- MySQL equivalent of DECODE function in Oracle
- How to do a batch insert in MySQL
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Using wpdb to connect to a separate database
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- WPDB Insert or if exists Update
- Will it break my site if I delete all transient records in wp_options table?
- Checking if Database Table exists
- WordPress (MyISAM) database is slow, should I switch to InnoDB?
- Please explain how WordPress works with MySQL character set and collation at a low level
- The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?
- Get error messages when $wpdb->insert() returns false?
- Detecting errors generated by $wpdb->get_results()
- How to fetch Data in WordPress using MySQLi or $wpdb
- WordPress Database lost auto increment
- Connect to database using wordpress wp-config file
- wpdb->insert multiple record at once
- Reset Post IDs to less than 64bit integer
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Restoring WordPress posts from database only
- WordPress database scalability from the code perspective
- Resetting comment count
- How to define composite keys with dbDelta()
- Is it possible to define two databases for one installation?
- Does WordPress use the InnoDB engine for MySQL by default?
- $wpdb->prepare() warning in WordPress 3.5
- Where are image paths to product category images stored in WordPress database
- Getting wrong relationship value in $args in wp_Query?
- Slow wp_term_relationships query
- How to use “TRUNCATE TABLE” MySQL statement?
- Sharing database for collaborative development
- Can I use MariaDB instead of MySQL in wordpress?
- Display data from a non wordpress database on a page template
- Changing the Database Connection Error Message
- Organizing WP Pages based on old website database
- Using Dynamic Data Pulled from a MySQL Table in a WordPress Page
- When importing database, it shows error
- WordPress for a very large website
- What are conventions about the schema of the $table_prefix
- Split WP install between 2 databases?
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- How to Join two tables from separate databases within WordPress