The present invention refers to compounds derived from hydroxyphenyl 1H-pyrrole rings, which have the following formula (I):as well as to the procedure for their preparation, pharmaceutical compositions comprising the same and the use thereof for the treatment and/or prevention of a condition mediated by histone deacetylase such as cancer, hematological malignancies, autoimmune diseases, inflammatory diseases, diseases of the central nervous system (CNS) such as neurodegenerative diseases and psychiatric disorders, cardiovascular diseases, endocrine and metabolic disorders, by inhibiting histone deacetylases and the therapeutic use of biological processes related to the mentioned inhibition.