Is there exist a metric $d$ on every infinite set such that $(X,d)$ be connected space? We know that discrete metric on every set (with at least 2 elements) is disconnected.but:
1) Is there exist a metric $d$ on every infinite set such that $(X,d)$ be connected space? For example $\mathbb N $ with $d(x,y) = | \frac{1}{x} - \frac {1}{y}| $ is connected space. 
2) also we know there is at least one metric on infinite set that is not compact ( for example discrete metric) but is there exist a metric $d$ on any infinite set that be compact? 
 A: *

*Any countable metric space with at least two points is disconnected, so on a countable set as $\Bbb N$ we cannot find a metric that induces a connected topology. Likewise on a set of size $\kappa < \mathfrak{c} = |\Bbb R|$.

*Compactness is always possible for general spaces: if $X$ has infinite size of some cardinal $\kappa$ the order topology on $\kappa+1$ is compact and this topology can be transported to the set via a bijection. But if $X$ has to be metric, a compact metric space has size at most $\mathfrak{c}$, and so for most sets it will be impossible. Any uncountable compact metric space has size continuum (contains a Cantor set) by a standard tree argument.
So in short: to be connected metric one has to have size at least continuum and to be compact metric you have to be at most size continuum. To be both means to be size continuum like $[0,1]^n$, $\mathbb{S}^n$ etc. etc. 
A: Let $(X,d)$ be a connected metric space with at least 2 points. Let $x,y\in X$ with $x\ne y.$
For each $r\in (0,1)$ there must exist $z_r\in X$ with $d(x,z_r)=r\cdot d(x,y).$ Otherwise for some $r\in (0,1)$ the open ball $B_d(x,\,r\cdot d(x,y)\,)$ and its complement are non-empty, open, and disjoint, with their union being $X.$
So $|X|\ge |\{z_r:r\in (0,1)\}|=|(0,1)|=2^{\aleph_0}.$
For cardinal $k>2^{\aleph_0},$ one connected metric space $(X,d)$ with cardinal $k$ is the HedgeHog Of Spininess $k\,$: Let $J$ be a set with $|J|=k,$ and let $X=\{0\}\cup (\,J\times [\Bbb R\setminus \{0\}]\,).$ 
For $r,r'\in \Bbb R\setminus \{0\}$ and for $j,j'\in J,$ let 
$d(0,(j,r))=|r|,\,$ and
$d((j,r),(j,r'))=|r-r'|,\,$ and 
$d((j,r),(j',r'))=|r|+|r'|\,$ if $j\ne j'.$
