Disclosed is a compound having an effect of activating glucokinase.A medicinal composition which comprises, as the active ingredient, a compound represented by general formula (I) or a pharmacologically acceptable salt of the same.In general formula (I), X represents a nitrogen atom or CR6 wherein R6 represents a hydrogen atom or a halogen atom; R1 represents a hydrogen atom, a C1-6 alkyl group, a C1-6 alkoxy group or a C1-6 alkylthio group; R2 represents a hydrogen atom or a fluorine atom; R3 represents a hydrogen atom or a C1-6 alkyl group; and one of R4 and R5 represents a hydrogen atom or a C1-6 alkyl group while the other represents a C1-6 alkylene carboxylic acid, a C1-6 alkylsulofonyl group, a C1-6 alkylcarbonyl group or CONH2.