mysql: Simplified binary auto-detection