Daniel Hernandez entered pleas Thursday to murder and premeditated attempted murder. A judge set his bail at $5 million, calling him an extreme danger to the public. He remains jailed.
Prosecutors say Hernandez stabbed an acquaintance, Antonia Duran, 22 times in her San Marcos apartment on Tuesday. Her daughter was sleeping but woke during the attack and screamed "Leave my mom alone!"
Authorities say Hernandez then decided to eliminate her as a witness.
Her liver, kidney and pancreas were punctured. Authorities say she's in a medically-induced coma but is expected to live.
Hernandez has previous convictions in Washington state for assault and domestic violence.