update sensor.php: change SQL INSERT for msg duplicate bug workaround (provisional), update grant for SQL base