The present invention relates to a compound represented by the general formula (I) (wherein the definition of each group has the same meaning as described in the specification). The compound is useful as preventive and/or therapeutic agent for KCNQ2-5 channel-related diseases.