entre Desarrolladores

Recibe ayuda de expertos

Registrate y pregunta

Es gratis y fácil

Recibe respuestas

Respuestas, votos y comentarios

Vota y selecciona respuestas

Recibe puntos, vota y da la solución

Pregunta

1voto

Xampp MySQL se detiene en Linux

Xampp MySQL se detiene en Linux, por eso me aparece el siguiente error:

DataTables warning: table id=example - An error occurred while connecting to the database 'example'. The error reported by the server was: SQLSTATE[HY000] [2002]

Cuando inicio MySQL desde Xampp o el comando lampp start mysql, inicia y luego inmediatamente se detiene.

¿Cómo hago para solucionarlo? ¿Cuáles pueden ser las causas de esto?

1 Respuesta

1voto

ArtEze Puntos870

Para iniciar MySQL se hace así, desde la terminal.

/opt/lampp/bin/mysql.server start

La salida es como la siguiente:

Starting MariaDB2021-12-30 08:42:44 13669 mysqld_safe Logging to '/opt/lampp/var/mysql/puppypc22006.err'.
/mnt/sda4/opt/lampp
2021-12-30 08:42:44 13669 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql

Luego hay que mirar el archivo /opt/lampp/var/mysql/puppypc22006.err

2021-12-30 08:45:24 14254 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
2021-12-30  8:45:25 0 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2021-12-30  8:45:25 0 [Note] /opt/lampp/sbin/mysqld (mysqld 10.4.22-MariaDB) starting as process 14420 ...
2021-12-30  8:45:25 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-12-30  8:45:25 0 [Note] InnoDB: Uses event mutexes
2021-12-30  8:45:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-12-30  8:45:25 0 [Note] InnoDB: Number of pools: 1
2021-12-30  8:45:25 0 [Note] InnoDB: Using generic crc32 instructions
2021-12-30  8:45:25 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-12-30  8:45:25 0 [Note] InnoDB: Completed initialization of buffer pool
2021-12-30  8:45:25 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-12-30  8:45:25 0 [Note] InnoDB: Setting log file /opt/lampp/var/mysql/ib_logfile101 size to 5242880 bytes
2021-12-30  8:45:25 0 [ERROR] InnoDB: preallocating 5242880 bytes for file /opt/lampp/var/mysql/ib_logfile101 failed with error 28
2021-12-30  8:45:25 0 [ERROR] InnoDB: Cannot set log file /opt/lampp/var/mysql/ib_logfile101 size to 5242880 bytes
2021-12-30  8:45:25 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-12-30  8:45:25 0 [Note] InnoDB: Starting shutdown...
2021-12-30  8:45:25 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-12-30  8:45:25 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-12-30  8:45:25 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-12-30  8:45:25 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-12-30  8:45:25 0 [ERROR] Aborting
2021-12-30 08:45:25 14254 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/puppypc22006.pid ended

La parte importante del archivo es la que contiene [ERROR].

2021-12-30  8:45:25 0 [ERROR] InnoDB: preallocating 5242880 bytes for file /opt/lampp/var/mysql/ib_logfile101 failed with error 28
2021-12-30  8:45:25 0 [ERROR] InnoDB: Cannot set log file /opt/lampp/var/mysql/ib_logfile101 size to 5242880 bytes
2021-12-30  8:45:25 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-12-30  8:45:25 0 [Note] InnoDB: Starting shutdown...
2021-12-30  8:45:25 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-12-30  8:45:25 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-12-30  8:45:25 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-12-30  8:45:25 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-12-30  8:45:25 0 [ERROR] Aborting
2021-12-30 08:45:25 14254 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/puppypc22006.pid ended

Como se puede ver, parece que es un problema que el disco está lleno, y por eso no puede escribir el log.

Cannot set log file /opt/lampp/var/mysql/ib_logfile101 size to 5242880 bytes

La solución es borrar archivos para liberar espacio.

0voto

Peter comentado

Gracias por compartir la solución!

0voto

ArtEze comentado

De nada... Aún no lo resolví completamente, es extraño porque ahora no muestra ningún error, pero tampoco inicia MySQL.

1voto

yoelrodguez comentado

Hola ArtEze, en una ocasión tuve un problema similar y estaba en que tenia un mysql puro en la máquina instalado el cual estaba usando el puerto 3306 que es el puerto de mysql por lo que el xampp no podía iniciar el servicio de mysql porque el puerto está en uso. En mi caso yo uso netstat para ver los puertos abiertos.

Gracias

0voto

ArtEze comentado

Es interesante ese comando, pero no te dice qué aplicación está abriendo el puerto.

0voto

yoelrodguez comentado

Hola, en tu caso si te digo que es el 3306 es del mysql.
Gracias

1voto

ArtEze comentado

Ah, ya sé cómó, netstat -p

Por favor, accede o regístrate para responder a esta pregunta.

Otras Preguntas y Respuestas


...

Bienvenido a entre Desarrolladores, donde puedes realizar preguntas y recibir respuestas de otros miembros de la comunidad.

Conecta