1

I am using xampp v 3.2.2.
I have change mysql port to 3308 and change the config.inc.php file as below:

$cfg['Servers'][$i]['host'] = '127.0.0.1:3308';

I am able to open phpmyadmin. But when I connect with the database with PHP it gives the following error:

Warning: mysqli_connect(): Server sent charset (255) unknown to the client

<?php
     $c=mysqli_connect("localhost","root","",playwithmusic);
?>
Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Does this answer your question? [mysqli\_connect to remote server](https://stackoverflow.com/questions/19575029/mysqli-connect-to-remote-server) – Torxed May 27 '20 at 18:48

1 Answers1

1

mySQL uses utfmb4, so if your client can't recognize it, then make mySQL use utf8 / utf8_unicode_ci

Change the my.cnf or my.ini file to

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8

Zach P.
  • 342
  • 1
  • 10