While Mr. Carranza may seem to project less political star power than the mayor’s initial pick, the Miami superintendent Alberto M. Carvalho, he has some prominent fans, including Marc Benioff, the billionaire chief executive of Salesforce, who pledged $27 million to the San Francisco Unified School District after Mr. Carranza became superintendent there in 2012.

“New York is very lucky to get somebody of his caliber,” Mr. Benioff said in an interview on Monday. “This is probably our nation’s finest school leader.”

Mr. Carranza has described himself as coming from a working-class background: His father was a sheet metal worker and his mother a hairdresser. His grandparents immigrated from Mexico. He didn’t learn English until he started elementary school. Music played a major role in his life from early on.

At Monday’s news conference, Mr. Carranza said he had been a mariachi musician since he was about 6 years old. When he wanted to stay up late with his father and his uncles, they said the only people staying up late were people playing instruments — so he learned to play the guitar. He later worked his way through college at the University of Arizona “gigging,” as he put it on Monday.

Afterward, when he became a social studies teacher at his former high school in Tucson, students knew that he played music and asked him to start a mariachi class. He did, and it eventually grew into a program serving 250 students and an award-winning student group, Mariachi Aztlán de Pueblo High School.