Showing posts with label DigitalOcean. Show all posts
Showing posts with label DigitalOcean. Show all posts

2018/09/17

How to change the time zone setting of MySQL running on cloud server such as DigitalOcean

I ran into an issue with the time stamp of the data stored in the MySQL database running on DigitalOcean droplet. The time stamp is 8 hours off from my current time. This post is a quick summary of how to solve this issue.

Check the current local time setting of the LAMP server

Ref.: https://www.tecmint.com/check-linux-timezone/

So, the time zone of the server is set to UTC. It needs to be changed to my time zone so that the time stamp could be corrected.

wei48221@lamp-s-1vcpu-1gb-sfo2-01:/etc/mysql$ timedatectl
      Local time: Tue 2018-09-18 12:39:28 UTC
  Universal time: Tue 2018-09-18 12:39:28 UTC
        RTC time: Tue 2018-09-18 12:39:28
       Time zone: Etc/UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

2018/08/27

How to use WinSCP to copy files / directories to directory that requires root privilege when root login has been disabled.

This post is about how to use WinSCP to copy files and/or directories to a Linux directory that requires root privilege but root login has been disabled for security reason.

Method - 1: Use WinSCP and Putty

1. Copy the files / directories from your computer to your home directory on a Linux machine using WinSCP first.