Are these phrases' use of 'know' roughly comparable? There is a bit of overlap.
Could they be referring to the same thing? No, not in these two verses.
John 17:3 Now this is eternal life: that they know [γινώσκωσιν] you, the only true God, and Jesus Christ, whom you have sent.
Strong's G1097, ginōskō carries a deeper sense of knowing.
New King James Version Matthew 1:25
and did not know (G1097) her till she had brought forth her firstborn Son. And he called His name JESUS.
New Living Translation But he did not have sexual relations with her until her son was born. And Joseph named him Jesus.
On the other hand,
Matthew 25:12 "But he replied, 'Truly I tell you, I don't know [οἶδα] you.'
Strong's G1492, eidō could just mean to "see".
Matthew 2:2 Saying, Where is he that is born King of the Jews? for we have seen (G1492) his star in the east, and are come to worship him.
Matthew 25:12 can be translated as
"But he replied, 'Truly I tell you, I have never seen you.' "
ginōskō God cannot be just a causal superficial knowledge of God. It is a bit like the difference between I have seen the President and I know the President and the President knows me.