In addition to the tip/solution presented by @Andréribeiro, after some tests, I was able to observe that:
Ascertain locations of my.cnf
There is no method to find where the file is my.cnf
, but the common locations are:
/etc/my.cnf
/etc/mysql/my.cnf (no meu caso estava aqui)
$MYSQL_HOME/my.cnf
[datadir]/my.cnf
~/.my.cnf
Source: https://stackoverflow.com/a/2485758/352449
Determine correct variable name
Effectively, not knowing whether the variable was correct or not, and given the error itself suggest that the variable is unknown, through the phpMyAdmin I executed the following command:
SHOW VARIABLES LIKE '%key_buffer%';
Having obtained variable name key_buffer_size
with the value 8388608
.
Source: https://serverfault.com/a/550748/128973
Documentation
In more detail, the documentation refers to key_buffer_size
, a little strange because the my.cnf
on this and other servers is with key_buffer
. I assume that this is some change of Mysql, with the my.cnf
outdated.
The problem was overcome by changing the name of key_buffer
for key_buffer_size
.
You inserted this directive
key_buffer
somewhere in the Mysql configuration? It seems to me=
should be with spaces around.– Rodrigo Rigotti
See if this "key_buffer=16M" is in
/etc/my.cnf
– André Ribeiro
@Andréribeiro Is in
/etc/mysql/my.cnf
written as follows:key_buffer = 16M

– Zuul
Comment on the line that will solve your problem
– André Ribeiro
@Andréribeiro will resolve and shut down the buffer. I have this line in my configuration (including increased value for performance reasons), and never gave this error.
– bfavaretto
@bfavaretto Will actually reset to the default value (8mb) which is quite low.
– André Ribeiro
@Zuul try switching to key_buffer_size and see if it works.
– André Ribeiro
@Andréribeiro Yes, that was the solution. I am responding with what I have been able to ascertain in the course of the process, but if you can answer with that indication, I would be grateful!
– Zuul