1
votes

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);
?>
1
Does this answer your question? mysqli_connect to remote serverTorxed

1 Answers

0
votes

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