The present invention aims to provide a compound having a TrkA inhibitory action, a pharmaceutically acceptable salt thereof, or a solvate thereof, a pharmaceutical composition containing the same as an active ingredient, and a preventive and / or therapeutic agent for medicinal use, in particular for a disease in which TrkA in involved (pain, cancers, inflammation / inflammatory diseases, allergic diseases, skin diseases, neurodegenerative diseases, infectious diseases, Sjogren's syndrome, endometriosis, renal diseases, osteoporosis, and the like). Specifically, the present invention provides a compound or an optical isomer thereof, a pharmaceutically acceptable salt thereof, a solvate thereof, or the like, the compound represented by formula (I):