How to insert Hindi in MySQL database using PHP, now am getting question mark

Run below SQL query to check default character set

SHOW VARIABLES LIKE ‘character\_set\_%’;

Variable_name             Value
character_set_client      utf8mb4
character_set_connection  utf8mb4
character_set_database    latin1
character_set_filesystem  binary
character_set_results     utf8mb4
character_set_server      latin1
character_set_system      utf8

here the character_set_database value is latin2 To insert Hindi in MySQL database using PHP, we need to update character_set_database value to utf8 ,ALTER DATABASE and change the DB character and set it to utf8 COLLATE utf8_bin

ALTER DATABASE DB_NAME CHARACTER SET utf8 COLLATE utf8_bin

How to push files to particular GitHub branch by branch name

To push files to particular GitHub branch by branch name

STEP 1 : clone

# git clone --single-branch -b BRANCH_NAME  https://github.com/**************.com.git

STEP 2: Config

# git config push.default upstream

STEP 3: Check out

#git checkout BRANCH_NAME

STEP 4: Do the changes and add

 
#git add .

STEP 5: Commit the changes

#git commit -m "home page change"

STEP 6: Finally

#git push origin BRANCH_NAME

You almost done

How to install xampp and FTP in AWS Linux 2 server

steps to install xampp and FTP in AWS Linux 2 server

steps to install xampp

Step 1

Download xampp PHP version 7

# wget https://www.apachefriends.org/xampp-files/7.2.2/xampp-linux-x64-7.2.2-0-installer.run

Step 2

Change file Permission

#chmod +x xampp-linux-x64-7.2.2-0-installer.run

Step 3

Run installer

#./xampp-linux-x64-7.2.2-0-installer.run

Step 4

Run xampp service

#sudo /opt/lampp/xampp start

steps to install FTP

Steps 1

install vsftp


#sudo yum install vsftpd

Steps 2

add Custom TCP Rule in security group


 Log in to the AWS EC2 Management Console and select Security Groups from the navigation tree on the left. Select the security group assigned to your EC2 instance. Select the Inbound tab and add port range 20-21

Now the  Inbound tab  look like this 
Type	        Protocol   Port Range	Source
SSH	         TCP	     22	        ip/32
HTTP	         TCP	     80	        0.0.0.0/0
Custom TCP Rule	 TCP	   20 - 21	0.0.0.0/0
Custom TCP Rule  TCP	  1024 - 1048	0.0.0.0/

Steps 3

Open configure files make sure that u have the below configuration


 #Vi /etc/vsftpd/vsftpd.conf 

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
chroot_list_enable=YES
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=**.***.***.** #your ip address
local_root=/opt/lampp/htdocs
use_localtime=YES

Steps 4

Create FTP user

# sudo adduser ftpuser

Steps 5

Create ftpuser Password

# sudo passwd ftpuser
type password

Steps 6

Login using ftp client

Open Filezilla

Host : YOUR IP ADDRESS

User :  ftpuser

Password : YOUR PASSWORD
and connect