Question

I'm trying to use a managed database but without success.

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

Subscribe
Share

Submit an 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.

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);

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…

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