Table of contents
  1. MYSQL
    1. SETTING TIMEZONES
      1. Get timezone
      2. Get timestamp
      3. Set timestamp utc
    2. other variables
    3. Import
    4. Show db users





MYSQL

mysql -u USERNAME -p
show databases;

SETTING TIMEZONES

Get timezone

SELECT @@global.time_zone, @@session.time_zone;

Get timestamp

 SELECT CURRENT_TIMESTAMP();

Set timestamp utc

 SET @@session.time_zone = '+00:00';
You can set in my.cnf

other variables

default_time_zone='+00:00'

GET PATHS

SHOW VARIABLES WHERE Variable_Name LIKE "%dir";

Import

LOAD DATA LOCAL INFILE 'C:/Groovy/englishData.csv' INTO TABLE original_data

FIELDS TERMINATED BY ','

ENCLOSED BY '"'

LINES TERMINATED BY '\r\n'

Show db users

SELECT user, authentication_string, plugin, host
FROM mysql.user;