How to make MySQL database encoded utf8_general_ci?

    2 answers 2

    $db = mysql_connect("host","user","password"); mysql_query("SET CHARACTER SET 'utf8",$db); 

    Works 100%. And to set the default in most mysql, use phpmyadmin.

      If you create via phpMyAdmin, then when creating it, select this encoding in the "Comparison" drop-down list.

      • and how to download this database on PC - cas
      • In what sense is "download"? You can dump the database in phpMyAdmin in the "Export" section. - Oleg Arkhipov