Solved: MySQL convert_tz returns null on MacOS Catalina using XAMPP

Note: A little bit of a story since I haven’t been writing for a while. If you are in a hurry for the solution, scroll down to The Solution

After a while, I am trying to write another blog. This time without using a keyboard. I am trying out voice to text feature on my new MacBook Pro 2019 model. I had to change my MacBook Pro retainer model due to random slow which turned out to be a problem with the logic board as per Apple genius.

Instead of using Time-Machine to restore files from old Mac, I did the manual copy-paste as the old mac was really slow and I was confident that I had time machine backup from the previous day. So I opened the time machine disc and copied over the files that I needed. But that came with a problem. I had to install fresh XAMPP and the timezone table was not loaded by default. One of the projects that I work with was using it and had to get it working.

The solution: 

While the discussion for the same issue is everywhere in MySQL forum and StackOverflow, nothing was working for me due to tightened security of Catalina and XAMPP’s way of running MySQL on Mac ( I am not using the virtual machine way of running XAMPP, but the regular old school way )

  1. Steps to the solution
  2. Open Terminal ( I use iTerm ).
  3. $ cd /Applications/XAMPP/xamppfiles/bin
  4. $ ./mysql_tzinfo_to_sql /usr/share/zoneinfo | sed -e “s/Local time zone must be set–see zic manual page/local/” | ./mysql -u root mysql

Remiz

Remixed version of unstable human emotions and thirst of mankind actions. UX designer, UI developer and HE of WebCastle Media Pvt LTD

Talk your view

%d bloggers like this:
Read previous post:
Why You Should Hire a Creative Marketing Agency for Your Next Campaign

There are few things that are quite as universally important in a business like marketing. Good marketing is at the...

Close