"The butcher, the baker, the candlestick maker" is not an idiom. It's a line of a nursery rhyme.
"Every Tom, Dick and Harry" means 'everybody, regardless of their status or worth'.
Student or Learner
Are these two idioms the same? If no, could you please tell me the difference in meaning and give me some example?
The butcher, the baker, the candlestick maker.
Every Tom, Dick and Harry.
[AmE - not a teacher]
As 5jj mentioned, the first is not an idiom. To me, "Every Tom, Dick and Harry" means any common/average person, usually with a slight negative connotation.
Example: "You'd better rethink your advertisement. You don't want every Tom, Dick, and Harry answering it."