Hi, I created a managed database to use with my droplet, imported all fine but when trying to connect via php I get this error “Server sent charset unknown to the client.” I understand this is caused by the utfmb4 charset that is configured in the MySql from the managed instance. How can I change this (to the database level and not schema or table level) so I can work with it? Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Can you recreate a db with utf8, re import and try again?
Other fixes usually have to do with mysql config, but you don’t have access to it with a managed instance
Any News about this? I also cannot connect from my PHP application due to the same error “Server sent charset unknown to the client”. Recreation did not fixed it…
Actually you can’t change managed database server’s chartset. So here work around only to change your php script to connect with server using utfmb4.
If you can post your database connection code then we can help you.
Here is sample code to connect with server using utfmb8 in php with pdo.
self::$instance = new PDO('mysql:host=' . DB_HOST . ';port=' . DB_PORT . ';dbname=' . DATABASE . ';charset=utf8mb4', DB_USER, DB_PASS, $pdo_options);
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
