diff --git a/CHANGELOG.md b/CHANGELOG.md index edc8e9b2..3aaaa5c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Changelog When instantiating the client, you need to provide at least the cache instance for metadata, as CachedClient does not know which implementation to pick. * Support for new Symfony versions. * Support for doctrine/dbal 4. -* For MySQL/MariaDB, it is now required to configure `collate` or `charset` in the Doctrine connection, or alternatively +* For MySQL/MariaDB, it is now required to configure `defaultTableOptions`.`collate` or `charset` in the Doctrine connection, or alternatively set the encoding explicitly with `Client::setCaseSensitiveEncoding('')` (e.g. `utf8mb4_bin`). * If you are on PHP 8.0 and install Jackalope with `symfony/cache`, you need to restrict `psr/simple-cache` to `^1.0 || ^2.0` in your application because Symfony 5 does not declare a conflict with it, but fails at runtime. * Drop support for PHP 7. diff --git a/README.md b/README.md index ec416751..9f184ae5 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,9 @@ Note that you need at least version 5.1.5 of MySQL, otherwise you will get ``SQL $ mysqladmin -u root -p create database jackalope $ echo "grant all privileges on jackalope.* to 'jackalope'@'localhost' identified by '1234test'; flush privileges;" | mysql -u root -p ``` + +Also note that with MySQL/MariaDB, you need to configure the encoding to be used (see "bootstrapping" below). + ### PostgreSQL ```sh @@ -136,10 +139,11 @@ $driver = 'pdo_mysql'; // pdo_pgsql | pdo_sqlite $host = 'localhost'; $user = 'admin'; // only used for recording information about the node creator $sqluser = 'jackalope'; -$sqlpass = ''; +$sqlpass = 'xxxx'; $database = 'jackalope'; // $path = 'jackalope.db'; // for SQLite $workspace = 'default'; +$charset = 'utf8mb4'; // only for MySQL/MariaDB // Bootstrap Doctrine $connection = DriverManager::getConnection([ @@ -149,6 +153,7 @@ $connection = DriverManager::getConnection([ 'password' => $sqlpass, 'dbname' => $database, // 'path' => $path, // for SQLite + 'charset => $charset, // only for MySQL/MariaDB ]); $factory = new RepositoryFactoryDoctrineDBAL();