The standard model (SM) of particle physics is spectacularly successful, yet the measured value of the muon anomalous magnetic moment $(g-2)_mu$ deviates from SM calculations by 3.6$sigma$. Several theoretical models attribute this to the existence of a dark photon, an additional U(1) gauge boson, which is weakly coupled to ordinary photons. The PHENIX experiment at the Relativistic Heavy Ion Collider has searched for a dark photon, $U$, in $pi^0,eta rightarrow gamma e^+e^-$ decays and obtained upper limits of $mathcal{O}(2times10^{-6})$ on $U$-$gamma$ mixing at 90% CL for the mass range $30<m_U<90$ MeV/$c^2$. Combined with other experimental limits, the remaining region in the $U$-$gamma$ mixing parameter space that can explain the $(g-2)_mu$ deviation from its SM value is nearly completely excluded at the 90% confidence level, with only a small region of $29<m_U<32$ MeV/$c^2$ remaining.