sábado, 4 de julio de 2009

Configuracion my.cnf

En linux podemos encontrar en /etc/my.cnf datos importantes con respecto a la configuracion de nuestro motor mysql.

Por ejemplo:

* Si tenes este tipo de error

ERROR 1153 (08S01) at line 3734: Got a packet bigger than 'max_allowed_packet' bytes

Podemos solucionarlo incrementando la variable max_allowed_packet. Esta variable puede tomar valores hasta de 1GB (solo en Mysql 5 en versiones anteriores la capacidad es mucho menor).

* Otro dato importante es saber donde se encuentra el Log de errores, esto lo podemos saber localizando la variable log-error

* Tambien podemos localizar el directorio data de mysql con la variable datadir


Archivo de ejemplo my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet=16M
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=0

# To allow mysqld to connect to a MySQL Cluster management daemon, uncomment
# these lines and adjust the connectstring as needed.
#ndbcluster
#ndb-connectstring="nodeid=4;host=localhost:1186"

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"

[ndb_mgm]
# connection string for MySQL Cluster management tool
connect-string="host=localhost:1186"

Saludos a todos !!!!

No hay comentarios.: