What is the meaning of Matthew 2:3?

Mt ch 2Mt 2:1Mt 2:2Mt 2:3Mt 2:4Mt 2:5Mt 2:6Mt 2:7
Mt 2:8Mt 2:9Mt 2:10Mt 2:11Mt 2:12Mt 2:13Mt 2:14Mt 2:15
Mt 2:16Mt 2:17Mt 2:18Mt 2:19Mt 2:20Mt 2:21Mt 2:22Mt 2:23

Bible references

When Herod the king had heard [these things], he was troubled, and all Jerusalem with him. (Matthew 2:3 KJV)

And when Herod the king heard it, he was troubled, and all Jerusalem with him. (Matthew 2:3 ASV)

But Herod the king having heard [of it], was troubled, and all Jerusalem with him; (Matthew 2:3 DBY)

When Herod the king heard it, he was troubled, and all Jerusalem with him. (Matthew 2:3 WEB)

And Herod the king having heard, was stirred, and all Jerusalem with him, (Matthew 2:3 YLT)

Interlinear

Mt 2:3 When /de/ Herod /Herodes/ the king /basileus/ had heard /akouo/ these things, he was troubled, /tarasso/ and /kai/ all /pas/ Jerusalem /Hierosoluma/ with /meta/ him. /autos/

Albert Barnes’ Commentary

Verse 3.  Had heard these things. Had heard of their coming, and of the star, and of the design of their coming.  

He was troubled. Herod had obtained the kingdom by great crimes, and by shedding much blood. He was, therefore, easily alarmed by any remarkable appearances; and the fact that this star appeared, and that it was regarded as proof that the King of the Jews was born, alarmed him. Besides, it was a common expectation that the Messiah was about to appear, and he feared that his reign was about to come to an end. He, therefore, began to inquire in what way he might secure his own safety, and the permanency of his government.

All Jerusalem. The people of Jerusalem, and particularly the friends of Herod.  There were many waiting for the consolation of Israel, to whom the coming of the Messiah would be a matter of joy; but all of Herod’s friends would doubtless be alarmed at his coming.