  The muon $(g-2)_\mu$ and $b\to s \bar \mu \mu$ induced $B$ anomalies as hints
of new physics beyond the standard model (SM) have attracted much attention.
These two anomalies indicate that there may exist new interaction specifically
related to muon. A lot of theoretical ideas have been proposed to explain these
anomalies. Gauged flavor specific $U(1)_{B_q-L_\mu}$ is among the promising
ones. The new gauge boson $Z'$ from $U(1)_{B_q-L_\mu}$ interacts with muon and
provides necessary ingredient to solve the $(g-2)_\mu$ anomaly. The $Z'$-quark
coupling can generate flavor changing interactions after diagonalization of
quark mass matrix between weak eigen-state and mass eigen-state basis. We
revisit challenges for such models attempting to explain the $(g-2)_\mu$ and
$B$ anomalies separately or simultaneously. We find although for
$U(1)_{B_q-L_\mu}$ models there is still parameter space to provide solutions
for separately explaining the $(g-2)_\mu$ and $B$ anomalies, there exists no
parameter space for such models to solve both the anomalies simultaneously,
after taking into account existing constraints from $\tau \to \mu \gamma$,
$\tau \to 3 \mu$, neutrino trident and $B_s - \bar B_s$ data. Among them
leptonic processes restrict $Z^\prime$ mass to be less than a few hundred MeV
if required to solve the $(g-2)_\mu$ anomaly, which causes conflict between
data from $B_s - \bar B_s$, $D^0 - \bar D^0$ mixing and also hadron decays with
$Z^\prime$ in the final states. The effects of $U(1)_Y$ and $U(1)_{B_q-L_\mu}$
kinetic mixing on these anomalies are also studied. We find that neither can
these effects do much to bring the two anomalies together to be solved
simultaneously.

High Energy Physics - Phenomenology