1
<?php 
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "test";
$conn = mysqli_connect($servername, $username, $password, $dbname);
$sql = "Insert into tbl (name) VALUES ('ஆன்லைனில்')";
$result = mysqli_query($conn, $sql);

But Its Store Db in
ஆனà¯à®²à¯ˆà®©à®¿à®²à¯

Ragupathi
  • 569
  • 4
  • 20
  • 2
    convert utf-8 or utf-16 – Venki WAR Jun 01 '18 at 09:01
  • Obligatory JoelOnSoftware: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ – Loek Jun 01 '18 at 09:01
  • My table Structure SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `tbl`; CREATE TABLE `tbl` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; – Ragupathi Jun 01 '18 at 09:05

3 Answers3

4

Change the column format

ALTER `tbl` CHANGE `column_name` `column_name` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
Sree KS
  • 1,311
  • 1
  • 13
  • 26
0

ALTER TABLE sample.sample_table CHARACTER SET = utf8 ;

-1
ALTER TABLE `mst_lyrics` CHANGE `lyrics_title` `lyrics_title` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; 
cs95
  • 379,657
  • 97
  • 704
  • 746
  • 2
    Harish Karam Have a look here on how to readably format your posts. https://stackoverflow.com/editing-help Also, please augment your code-only answer with some explanation, in order to help fighting the misconception that StackOverflow is a free code writing service. – Yunnosch Aug 06 '19 at 06:25