Fixing MySQL autostart failure on Yosemite

There's been some DB errors on the website today because there had been reboots and MySQL failed to automatically start each time ever since upgrading to OS X 10.10 Yosemite. I knew of this problem, but since the disruption was starting to get annoying I decided to find a way to fix it. Apparently, the fix goes all the way to 2010 for fixing the same issue in OS X 10.6 Snow Leopard by Marko Tomic. Then a simpler version for Yosemite came up a few weeks ago, which is largely similar to a 2013 entry at Apple Support Communities.

This was happening because MySQL has been using a very old way to autostart the service and never bothered to update it, making it susceptible to failure for several years already. Until there's an official fix, the following should be entered into the Terminal.app, which is essentially creating a plist file for the LaunchDaemon to use on boot.

sudo nano /Library/LaunchDaemons/com.mysql.mysql.plist

Upon entering the "nano" editor, type (or paste) the following lines.

<!--?xml version="1.0" encoding="UTF-8"?-->
<plist version="1.0">
  <dict>
    <key>KeepAlive</key>
    <true />
    <key>Label</key>
    <string>com.mysql.mysqld</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/mysql/bin/mysqld_safe</string>
      <string>--user=mysql</string>
    </array>        
  </dict>
</plist>

Press Ctrl-O, Enter, then Ctrl-X to save and quit. Then you need to set the file's owner & permissions and load into the LaunchDaemon.

sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

Finally, restart the Mac and MySQL should autostart. Remember to restart immediately.
Defined tags for this entry: , ,

Having fun with light trails

Swing away!

Round and round!

Celine and I had some fun making light trails at home during the night. The whole thing was spontaneous, but the results were pretty good. There weren't so much to prepare. All I needed to do was to have my iPhone 5S shoot at 1/2 second shutter speed, while Celine swung this LED-equipped electric fan all over the place.

M&M's Light Up Candy Fan
Defined tags for this entry: , , , , , ,

Longer numeric passcode on iOS

iPhone lockscreen with long numeric passcode
My lockscreen passcode is longer than 4 digits
By default, iOS devices like iPhones and iPads use 4-digit passcodes for the lockscreen. You could also use alphanumeric passcodes that are more secure, but they bring up a keyboard on the lockscreen. This is rather cumbersome compared to a keypad.

What's often overlooked is that there is in fact a nice compromise between the two. You could use a long numeric passcode, and it'll give you a keypad just like when you use a 4-digit passcode, as you can see here. You do need to press a button after entering the digits, but that's because it won't let someone guess how long it is.

I think this is even more useful when coupled with the Touch ID in iPhone 5S. You can still use the fingerprint to conveniently unlock most of the time, and you'll feel more safe in that there is less of a chance someone else could bypass that and unlock using a passcode instead. And the "autofill" of the passcode when you press your finger to unlock doesn't reflect how long the passcode is, either. It just shows nine dots all the time. A perpetrator won't be able to guess the length of the passcode by glancing at your screen.
Defined tags for this entry: , ,

Scored an NFC tag at an expo

Blank RFID card formatted to work as a tag
Blank RFID card formatted to work as a tag

Late last month, there was an RFID-themed expo called RFID/IoT World Congress 2013 in COEX. The entry badge happened to contain an RFID card that you could use to tag at a booth so the company running it could know that you visited. It turns out that the card is basically a blank RFID card. My contact info must have been paired to the card's serial number, and the terminals merely checked the number and pulled the paired contact data from a central database.

When I took it home and poked it around with the only NFC-enabled smartphone I have, LG Prada 3.0, the card was a generic MIFARE Ultralight card without any locks or data. These types of card can only contain 64 bytes of data, 48 of which is user-programmable, so it's apparently very limited and cheap. That seems to be a sensible choice for something to hand out to thousands of visitors.

Because it was initially unformatted, regular NFC apps on the phone refused to do anything with it. But with the NXP TagWriter app, I was able to format and write data into it at once. To test, I tried to program the URL of this website and its title into it. It ended up being 47 bytes total, and the card reserved 2 bytes for something else, so it went over the storage limit. I omitted the hyphen and I was able to write the data successfully. When I tag the phone with it, it would load this website.

Looks like I should try to find some cheap MIFARE Ultralight cards like this one and happily program all sorts of things to it.
Defined tags for this entry: , , ,

Simpsons Tapped Out iOS 7 Login Bug Analyzed

Simpsons: Tapped Out screenshot of Wesley's Springfield
My Springfield
If you're playing Simpsons: Tapped Out game (iOS / Android) on your spare time like me, and also happened to be a developer that upgraded your phone to iOS 7 (beta 1), then you may encounter a bizarre bug where you automatically get login to a completely random, but different account.

Some leafing through the web yielded some clues on what was likely going on. It seems to be caused by the way EA implemented the device and account management.

Apparently, EA decided to keep session information of both the device and the account that it's logged in on the server. When a user exits the game and comes back, the game checks the device and automatically login to the account it was last associated with. Seems harmless, right?
Continue reading "Simpsons Tapped Out iOS 7 Login Bug Analyzed"

ν•œκ΅­μ—μ„œ iOS 4.2 "λ‚˜μ˜ iPhone μ°ΎκΈ°" μΌœλŠ” 법

"Find My iPhone" logo courtesy of Apple Inc.
였늘 (ν•œκ΅­μ‹œκ°„ 2010λ…„ 11μ›” 23일 μƒˆλ²½) μ• ν”Œμ˜ iOS 4.2κ°€ 곡식 μΆœμ‹œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. μƒˆλ‘œμš΄ κΈ°λŠ₯이 μ—¬λŸΏ μžˆλŠ”λ°, κ·Έ 쀑 베타기간 λ™μ•ˆ λ³„λ‘œ 언급이 μ—†μ—ˆλ˜ 것이 λ°”λ‘œ "λ‚˜μ˜ iPhone μ°ΎκΈ°(Find My iPhone)" μ„œλΉ„μŠ€μ˜ 무료 μ „ν™˜μž…λ‹ˆλ‹€. μ›λž˜λŠ” $99/λ…„ ν•˜λŠ” λͺ¨λ°”일미 μ„œλΉ„μŠ€μ˜ μΌλΆ€λ‘œ μ œκ³΅λ˜μ—ˆλ˜ κΈ°λŠ₯μ΄μ§€μš”. μ•„λ§ˆ 경쟁 OSμ—μ„œ μœ μ‚¬ν•œ κΈ°λŠ₯을 무료둜 μ œκ³΅ν•˜κΈ° μ‹œμž‘ν•œ 점이 영ν–₯을 λ―ΈμΉ˜μ§€ μ•Šμ•˜μ„κ°€ μΆ”μΈ‘ν•΄ λ΄…λ‹ˆλ‹€.

μ–΄μ¨Œλ“ , 이 κΈ°λŠ₯을 μ“°κ²Œ 되면 μ›κ²©μ—μ„œ iOS 기기의 μœ„μΉ˜λ₯Ό μΆ”μ ν•˜κ±°λ‚˜, 기기에 μ›ν•˜λŠ” λ©”μ‹œμ§€λ₯Ό λ„μš°κ±°λ‚˜, λ°œκ²¬ν•œ μ‚¬λžŒμ΄ λͺ» 쓰도둝 μž κ·Έκ±°λ‚˜ λ‚΄μš©μ„ μ™„μ „νžˆ μ‚­μ œν•  수 μžˆμ–΄μ„œ κΈ°κΈ°λ₯Ό λΆ„μ‹€ν–ˆμ„ λ•Œ μœ μš©ν•©λ‹ˆλ‹€. 그런데 μ•ˆνƒ€κΉκ²Œλ„ μœ„μΉ˜κΈ°λ°˜μ„œλΉ„μŠ€(LBS) κ΄€λ ¨ 법적 문제둜 κ³΅μ‹μ μœΌλ‘œ κ΅­λ‚΄μ—μ„œλŠ” μ•„μ§κΉŒμ§€ μ‚¬μš©μ΄ μ•ˆλ˜λ„λ‘ μ‘°μΉ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

λ‹€ν–‰μŠ€λŸ¬μš΄ 것은, μ œν•œμ„ κ±°λŠ” 방식이 USIM κΈ°λ°˜μ΄λΌλŠ” μ μž…λ‹ˆλ‹€. κ΅­λ‚΄μ—λŠ” KTμ—μ„œλ§Œ κ³΅μ‹μœΌλ‘œ 아이폰과 μ•„μ΄νŒ¨λ“œλ₯Ό μΆœμ‹œν•œ κ΄€κ³„λ‘œ, KT USIM이 κ½‚ν˜€μžˆμ„ λ•Œμ—λ§Œ "λ‚˜μ˜ iPhone μ°ΎκΈ°" μ˜΅μ…˜μ΄ μ•ˆ λ‚˜νƒ€λ‚©λ‹ˆλ‹€. SKT USIM을 κ½‚μœΌλ©΄ λΉ„λ‘œμ†Œ λ‚˜νƒ€λ‚˜μ§€μš”. USIM이 κ°œν†΅λ˜μ§€ μ•Šμ•˜λ”λΌλ„, μ’…λ₯˜κ°€ 일반 USIM이 μ•„λ‹Œ 데이터쉐어링(OPMD)용 USIM이라도 SKT 것이면 상관 μ—†μŠ΅λ‹ˆλ‹€.

그럼 ꡬ체적으둜 μΌœλŠ” 방법을 μ•Œμ•„λ΄…μ‹œλ‹€.
Continue reading "ν•œκ΅­μ—μ„œ iOS 4.2 "λ‚˜μ˜ iPhone μ°ΎκΈ°" μΌœλŠ” 법"

Phase 1 Success!


The new wearable computing project has now seen the first fruit of labour. The main system module, a completely functioning system that only needs power source, input device, and monitor, is now in working order with its own casing. As you can see, it is only as big as a novel, but houses a Pentium M 1.6GHz, 1GB of memory, 100GB hard disk, and a power supply that accepts 8V to 13.6V DC voltage.

Copyright (C) 1996-2024 Woo-Duk Chung (Wesley Woo-Duk Hwang-Chung). All rights reserved.