Categories: Programming

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

Recent Posts

Apple push notification php example code 2021

For a long time since Push notification became a thing on iOS, it was very simple to integrate push notification…

8 months ago

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…

2 years ago

Bring back PPTP VPN on iOS 10 and macOs sierra

Since latest iOS and macOs removed support for PPTP VPN from their built in client, here is how you can…

5 years ago

This will Change

Back to habits of young days. Shaping up another life. Starting like a kid who is a great king.

7 years ago

2013 – the fastest year ever !

Today, when I logged in to my pc & open Chrome, I saw this nice Google Doodle for New Year’s…

8 years ago

Search a formatted number in a MySQL table with a differently formatted search word

Here is the MySQL query to find formatted phone number by a differently formatted search text

9 years ago