igaster/laravel_cities

Doctrine\DBAL\Driver\PDOException while seeding US database

ftrudeau opened this issue · 2 comments

Seeding of US database always stops at row 9,283, with following error :
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x90\x8C\xB9\xF0\x90...' for column 'alternames' at row 1

Seeding of CA database works fine.

My app is running on latest Laravel 5.6 with MariaDB 10.2.7

Please advise.

It seems like a mysql encoding issue. The recomended encoding for your tables is utf8mb4. Can you verify your server settings?

Yes, changing charset to utf8mb4 and collation to utf8mb4_unicode_ci fixed the problem, thanks.