-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database connection #1022
Comments
Pretty sure MySQL/MariaDB is the most widely used database, so providing default config for it makes things a tad bit easier for users. The issue is due to the fact that the default datasource config exists in both |
Having the main (and for all drivers valid) config in app would still be a bit more DRY. |
Can that specific value should not be set by default one "lvl down" (driver or whatever) with the most valid value (utf8mb4). And let it appear in local env file as comment in order to let know people need to change it the option exist. |
This would revert #1011 The downside of it would be: It will for many not be clear they are silently using utf8 connection. |
Description
I've created a cakephp 5 project with a postgresql database. I configured the database as usual and got this error message : CakePHP is NOT able to connect to the database.
SQLSTATE[22023]: Invalid parameter value: 7 ERREUR: valeur invalide pour le paramètre « client_encoding » : « utf8mb4 »
To solve the problem, we had to comment out the line in app.php : 'encoding' => 'utf8mb4',
and I don't think it's right that the cakephp system encourages you to use a MariaDB/MySQL database instead of another one. I think that this field should be commented out by default and that it should be up to MariaDB/MySQL users to uncomment it.
CakePHP Version
5.1.1
PHP Version
No response
The text was updated successfully, but these errors were encountered: