Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Local WordPress Development Local WordPress Development Migrating WordPress from Local to Live Server

Pawel Sysiak
Pawel Sysiak
3,920 Points

How to resolve the following Error on phpmyadmin?

I was following the video step by step. When I was importing the database to phpmyadmin I got the following error:

(I am doing this for the first time. Thanks for the patience in advance)

Error

SQL query:

-- Database: localwp


--

-- Table structure for table wptest_commentmeta

CREATE TABLE wptest_commentmeta ( meta_id bigint(20) UNSIGNED NOT NULL, comment_id bigint(20) UNSIGNED NOT NULL DEFAULT '0', meta_key varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, meta_value longtext COLLATE utf8mb4_unicode_520_ci ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; MySQL said: Documentation

1273 - Unknown collation: 'utf8mb4_unicode_520_ci'

Pawel Sysiak
Pawel Sysiak
3,920 Points

Could it be caused because MAMP uses MySQL 5.6 and database on my server uses 5.5?

Pawel Sysiak
Pawel Sysiak
3,920 Points

Somebody suggested that it may happen because of the wrong name of the database: the online database is trying to locate "localwp" database, but the online database name is different. I cannot change the online database name to "localwp". I have to use certain predetermined prefix. Is it possible to change the name of the local database?

I am doing it for the first time. I would really appreciate some help.

Pawel Sysiak
Pawel Sysiak
3,920 Points

I solved it. I needed to manually change "utf8mb4_unicode_520_ci" to "utf8mb4_unicode_ci" in the SQL file.