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 trialRowan Sims
4,898 PointsProblem importing database file to dreamhost
I've followed the instructions in this video carefully, but when I try to import the sql file to the database that I've created I get an error for some reason:
Error SQL query:
Table structure of table wp_commentmeta
CREATE TABLE wp_commentmeta
(
meta_id
BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
comment_id
BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0',
meta_key
VARCHAR( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL ,
meta_value
LONGTEXT COLLATE utf8mb4_unicode_ci,
PRIMARY KEY ( meta_id
) ,
KEY comment_id
( comment_id
) ,
KEY meta_key
( meta_key
( 191 ) )
) ENGINE = INNODB AUTO_INCREMENT =3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
MySQL said: Documentation
1273 - Unknown collation: 'utf8mb4_unicode_ci'
Most of this is gibberish to me, so I'm hoping somebody else might be able to help me out with this. Maybe Zac Gordon?
Thanks Rowan
2 Answers
Gilbert Kennen
10,661 PointsIt is apparently a problem with phpMyAdmin which is usually solved by deleting browser cookies related to the site it is running on. With Dreamhost, you are probably using their hosted phpMyAdmin instance, so you won't be able to hack the files as the linked solution suggests.
There are likely several tools for doing this depending on your operating system. I would personally use a console terminal to run a .sql file on the database. With mysql or mariadb tools installed, I would save my sql commands in commands.sql and run:
mysql -h "the database server name" -u my_username -p my_database < commands.sql
If I couldn't run this command on a local machine, I could always use ssh or puTTY to log into Dreamhost, upload the file, and run the command from there.
Jonathan Romine
9,344 PointsWhen you exported the db , did you export in .gzip auto increments?
Rowan Sims
4,898 PointsI just followed the instructions in the video. I've done it before without any dramas.