[SOLVED] SQL Import Errors

phpmyadmin
wordpress
mysql
database

#1

I’m trying to setup a Wordpress development environment here on Cloud9 and I’m having an issue when trying to import my exported .sql file into the ‘c9’ database. Lots of Table doesn’t exist errors. Fun!

mysql-cti cli
use c9;
source 'myfile.sql';

then:

ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_comments' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_terms' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_term_relationships' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_term_taxonomy' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_usermeta' doesn't exist
ERROR 1273 (HY000): Unknown collation: 'utf8mb4_unicode_520_ci'
ERROR 1146 (42S02): Table 'c9.wp_users' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_commentmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_comments' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_links' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_termmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_terms' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_term_relationships' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_term_taxonomy' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_usermeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_users' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_commentmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_comments' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_links' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_options' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_postmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_posts' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_termmeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_terms' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_term_taxonomy' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_usermeta' doesn't exist
ERROR 1146 (42S02): Table 'c9.wp_users' doesn't exist

#2

So I’ve installed phpMyAdmin and trying to import there, I see the file size error.

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

I edited the php.ini file in my root directory to no avail.


#3

SOLUTION
After zipping the .sql file it would upload but then I was receiving an Unknown collation error. I used my editor to Replace All instances of utf8mb4 and utf8mb4_unicode_ci.

I looks like it uploaded correctly, now to see if it actually works! :nerd_face:

Helpful links: