Catalysis of the reaction: (R)-mevalonate + CoA + 2 NAD(+) <=> 3-hydroxy-3-methylglutaryl-CoA + 2 NADH.