Plugin’s db dump can’t be used with mysql
-
We need to move the db to localhost for testing.
I extracted wpress file using
docker run –rm -v $(pwd):/app -u $(id -u ${USER}):$(id -g ${USER}) node:16 /bin/sh -c ‘cd /app && npx wpress-extract migration.wpress’
But when I try to import the db locally using mysql:
mysql –user=admin –password=admin –database=site –host=site < web/db/www.site.sk-20240125-094333-0j5mbb/wpress/migration/database.sql
It fails on emojis:
ERROR 1366 (22007) at line 37845: Incorrect string value: ‘\xF0\x9F\x99\x8C” …’ for column
site.SERVMASK_PREFIX_email_log.messageat row 1Then I saw that the generated SQL file is really not the standard mysqldump file. If I add this to the top:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE=’+00:00′ */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’ */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;And this to the bottom:
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;It starts to work. Also, the table prefixes are wrong: the are SERVMASK_PREFIX_ instead of wp_.
So my question is why are you reinventing mysqldump in an incompatible way? Please leave these options there.
The topic ‘Plugin’s db dump can’t be used with mysql’ is closed to new replies.