Mysql User Access | Grant Access to User in MySQL

How to give GRANT access to existing MYSQL Users ?

1) SELECT access

GRANT select on <> to <>@%

DBName > Database Name
User Name > MYSQL User Access Name

Movers in Dubai

Example :-

GRANT select on ‘MASTER.*’ to ‘GuestUser@%’


2) UPDATE, INSERT, DELETE Access

GRANT INSERT, UPDATE, DELETE on <> to <>@<>

MySQL Data to JSON

How to convert MYSQL Datas to JSON.

json_encode ($datas)

json_decode($datas)

Import CSV file to MySQL | MySQL Import CSV

This below example shows you how to use the LOAD DATA INFILE statement to import CSV file into MySQL table.

The LOAD DATA INFILE statement allows you to read data from a text file and import the file’s data into a database table very fast.

Before importing the file, you need to complete the following steps :

1) Data Import table should be created
2) CSV Columns Should be match with the Database Table.
3) Access required to execute the query

LOAD DATA INFILE ‘<<CSV File Name>>’
INTO TABLE <<Table Name>>
FIELDS TERMINATED BY ‘,’
ENCLOSED BY ‘”‘
LINES TERMINATED BY ‘\n’
IGNORE 1 ROWS

Example :-

LOAD DATA INFILE ‘f:/LeadsDetails.csv’
INTO TABLE oldleads
FIELDS TERMINATED BY ‘,’
ENCLOSED BY ‘”‘
LINES TERMINATED BY ‘\n’
IGNORE 1 ROWS