MySQL: timezone

MySQL has system timezone, global timezone and session timezone (also call as per request timezone).

System timezone is current machine's timezone.
Global timezone and session timezone default value is system timezone.

When user insert a value to timestamp column (we call "date1"), MySQL suppose date1 as session timezone and convert to global timezone then save to DB.

When user select timestamp column, MySQL will convert from global timezone to session timezone than return value.

MySQL: Copy table structure to excel using Sequel Pro

Just run this command and copy all results:

describe table_name;
Or if need more infomation about structure:
SELECT * from information_schema.columns
WHERE table_schema = 'database_name'
AND table_name = 'table_name';

Or export to file:

SELECT * from information_schema.columns
WHERE table_schema = 'database_name'
AND table_name = 'table_name'
INTO OUTFILE '/tmp/export.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n';