Exporting a latin1 encoded MySQL database from PhpMyAdmin
Tonight, I helped a veteran Piwigo user to migrate to piwigo.com hosting. The main problem I encountered was PhpMyAdmin.
In his MySQL database, strings were using latin1 character set, he was still using PhpWebGallery 1.7. Unfortunately, there was no access to any mysql command line, so I had to deal with PhpMyAdmin and whatever option I could check or uncheck in the export tool, I had an utf8 encoded database dump. I import it the following way:
mysql --user=*** --password=*** pwg213 < dump.sql
Imported as is, the dump generated a messy result in the browser. So instead of just importing the dump from the command line, I used the mysql shell and set the client character set first:
mysql --user=*** --password=*** pwg213 mysql> set names utf8; mysql> source dump.sql
Then all was fine, the upgrade from PhpWebGallery 1.7 to Piwigo 2.1 was as easy as usual with only 664 photos.