No need to touch SQL, the secret is to keep the data pure. See the example in PHP, create only an array and manually play the months in string starting from 1.
$query = "SELECT Year(date) as ano, MONTH(date) as mes, DAY(date) as dia, guitarwars.* FROM guitarwars WHERE approved = 1 ORDER BY score DESC, date ASC";
then create an array $mes:
$mes = array(1 => "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro");
then you play the month value within the array call:
echo 'Mes ' . $mes[$row['mes']];
You don’t have to hit your head on anything, and that’s until good practice.
Thank you very much to the staff who posted. I got in the first attempt using the topic quoted by Gustavo Cinque:
SET lc_time_names = 'pt_BR';
UPDATE tabela SET Mes = (MONTHNAME(Data)) WHERE Mes IS NULL;
Thank you very much– Rodrigo Segatto