Wp scaffold book-theme edupool leads to warnings and an error

wp scaffold book-theme edupool leads to the following warnings ans error. My local pressbooks is running normally meanwhile. wp-cli is up-to-date

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Applications/MAMP/htdocs/wordpress/wp-includes/wp-db.php on line 1548
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Applications/MAMP/htdocs/wordpress/wp-includes/wp-db.php on line 1578
Warning: mysql_connect(): No such file or directory in /Applications/MAMP/htdocs/wordpress/wp-includes/wp-db.php on line 1578
Error: Fehler beim Aufbau einer Datenbankverbindung. Das bedeutet entweder, dass die Information über den Benutzernamen und das Passwort in deiner wp-config.php Datei nicht korrekt ist, oder wir können den Datenbank-Server auf localhost nicht erreichen. Es könnte sein, dass der Datenbank-Server deines Hostings ausgefallen ist.

Google led me to this: https://github.com/wp-cli/wp-cli/issues/317

Thank you that helped! I had to put the follwing DB_HOST into my wp-config.php and then it worked:
define(‘DB_HOST’, ‘127.0.0.1:3306’);