Primeiramente, parece que você tem alguns problemas de copiar e colar acontecendo. O mysql>
é o prompt do cliente do console, portanto, isso nunca deve estar em nenhum arquivo de configuração.
Em segundo lugar, ao definir variáveis no arquivo de configuração , eles apenas se enquadram nos respectivos [section]
cabeçalhos um por linha e os valores de chave são separados por um sinal igual a =
.
Então, em /etc/mysql/mysql.conf.d/mysqld.cnf
em qualquer lugar abaixo de [mysqld]
add:
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION