0 votes

error with Xampp MySQL shutdown unexpectedly Previously opened without problem

Hello! Overnight, the mysql service of my Xampp does not start. I do not use Skype or similar. Apache does start perfectly.

The netstat of Xammp itself shows me how old socket the mysql connection on the ip 0.0.0.0 port 3306 . Name: mysqld.exe .

I have also checked that it is free with the Windows cmd. And, indeed, it is not in use. I have also tried to change the port to 3307 both in the mysql configuration itself ( my.ini ) as well as in the configuration of Xampp itself in the "Service and Port Settings" section.

And it remained the same. And, of course, I tried rebooting the laptop after changing it. But there is no apparent change. I keep getting the same error. That's why I left it back to 3306.

Here is the complete message from the Xampp control panel

21:41:14 [main] Initializing Control Panel 21:41:14 [main] Windows Version: Home 64-bit 21:41:14 [main] XAMPP Version: 7.1.32 21:41:14 [main] Control Panel Version: 3.2.4 [ Compiled: Jun 5th 2019 ] 21:41:14 [main] You are not running with administrator rights! This will work for 21:41:14 [main] most application stuff but whenever you do something with services 21:41:14 [main] there will be a security dialogue or things will break! So think 21:41:14 [main] about running this application with administrator rights! 21:41:14 [main] XAMPP Installation Directory: "c: \xampp\ " 21:41:14 [main] Checking for prerequisites 21:41:14 [main] All prerequisites found 21:41:14 [main] Initializing Modules 21:41:14 [main] The FileZilla module is disabled 21:41:14 [main] The Mercury module is disabled 21:41:14 [main] The Tomcat module is disabled 21:41:14 [main] Enabling autostart for module "Apache" 21:41:14 [main] Enabling autostart for module "MySQL" 21:41:14 [main] Starting Check-Timer 21:41:14 [main] Control Panel Ready 21:41:14 [Apache] Autostart active: starting... 21:41:14 [Apache] Attempting to start Apache app... 21:41:14 [mysql] Autostart active: starting... 21:41:14 [mysql] Attempting to start MySQL app... 21:41:15 [Apache] Status change detected: running 21:41:15 [mysql] Status change detected: running 21:41:16 [mysql] Status change detected: stopped 21:41:16 [mysql] Error: MySQL shutdown unexpectedly. 21:41:16 [mysql] This may be due to a blocked port, missing dependencies, 21:41:16 [mysql] improper privileges, a crash, or a shutdown by another method. 21:41:16 [mysql] Press the Logs button to view error logs and check 21:41:16 [mysql] the Windows Event Viewer for more clues 21:41:16 [mysql] If you need more help, copy and post this 21:41:16 [mysql] entire log window on the forums 21:55:28 [mysql] Attempting to start MySQL app... 21:55:29 [mysql] Status change detected: running 21:55:31 [mysql] Status change detected: stopped 21:55:31 [mysql] Error: MySQL shutdown unexpectedly. 21:55:31 [mysql] This may be due to a blocked port, missing dependencies, 21:55:31 [mysql] improper privileges, a crash, or a shutdown by another method. 21:55:31 [mysql] Press the Logs button to view error logs and check 21:55:31 [mysql] the Windows Event Viewer for more clues 21:55:31 [mysql] If you need more help, copy and post this 21:55:31 [mysql] entire log window on the forums

And the log message is:

InnoDB: using atomic writes. 2020-04-25 21:41:15 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2020-04-25 21:41:15 0 [Note] InnoDB: Uses event mutexes 2020-04-25 21:41:15 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-04-25 21:41:15 0 [Note] InnoDB: Number of pools: 1 2020-04-25 21:41:15 0 [Note] InnoDB: Using SSE2 crc32 instructions 2020-04-25 21:41:15 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M 2020-04-25 21:41:15 0 [Note] InnoDB: Completed initialization of buffer pool 2020-04-25 21:41:15 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2020-04-25 21:41:15 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2020-04-25 21:41:15 0 [Note] InnoDB: Setting file ' C:\xampp\mysql\data\ibtmp1 ' size to 12 MB. Physically writing the file full; Please wait ... 2020-04-25 21:41:15 0 [Note] InnoDB: File ' C:\xampp\mysql\data\ibtmp1 ' size is now 12 MB. 2020-04-25 21:41:15 0 [Note] InnoDB: Waiting for purge to start 2020-04-25 21:41:15 0 [Note] InnoDB: 10.4.6 started; log sequence number 1926016; transaction id 2085 2020-04-25 21:41:15 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool 2020-04-25 21:41:15 0 [Note] Plugin 'FEEDBACK' is disabled. 2020-04-25 21:41:15 0 [Note] Server socket created on IP: '::'.

The most shocking thing is that every time in the log I get the following message created on IP: '::' although it did work for me.

Use Windows 10 Home .

In case there is no other option but to uninstall... would the database remain intact when reinstalling or would there be a problem? or would there be a problem?

I hope you can help me! Thank you very much!

0 votes

Check the Windows Event Viewer for application errors and share them.

0 votes

One of the errors says: Error 25/04/2020 19:48:18 MariaDB 100 None and in the General description it says: mysqld.exe: Table '. \mysql\db ' is marked as crashed and should be repaired En Usuario pone No disponible. El que le sigue es una advertencia en vez de error. Dice: Recovering table: '. \mysql\db ' A continuación otro error: Couldn't repair table: mysql.db. Siguiente error: mysql.db: 176 for record at pos 0. Siguiente: Aborting. Siguiente: Fatal error: Can't open and lock privilege tables: Index for table 'db' is corrupt; try to repair it. Todos ellos de MariaDB.

0voto

Jbeltran Points 728

If you have one or more corrupted tables in your database, I suggest you perform the following procedure:

  1. Run mysql in recovery mode. To do this you must modify the my.ini file and add the innodb_force_recovery After modifying the file you can start Mysql from the console. This change allows the server to run even if it detects a corrupted page Info

    innodb_force_recovery = 1
  2. Run mysqlcheck on your database to determine which tables are corrupt. This will help you identify corrupt tables. help on this instruction Info

    mysqlcheck -u user -p --analyze --all-databases
  3. Export corrupted tables with mysqldump. Help on this instruction Info

     mysqldump -u user -p  mydb t1 > mydb_tables.sql
  4. Remove corrupted tables. Help on this instruction Info

     DROP TABLE t1;
  5. Stop the mysql service and edit the my.ini file by removing the the property we added in the point 1

  6. Start Mysql in normal mode and import the exported tables in the point 3 . Help on this instruction Info

     mysql -u user -p mydb < mydb_tables.sql

I hope I have been as explicit as possible, depending on your environment the steps or properties of the instructions may vary to solve your problem for that reason I added a link in each step so you can help you.

0 votes

I have tried from the Xampp shell. I type mysql and it responds: Can't connect to MySQL server on 'localhost' (10061) . I try putting mysqld instead and the message is: 2020-04-26 15:12:56 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. 2020-04-26 15:12:56 0 [Note] mysqld (mysqld 10.4.6-MariaDB) starting as process 17936 ... And when I put the next line I get this answer: mysqlcheck: Got error: 2002: Can't connect to MySQL server on 'localhost' (10061) when trying to connect .

0 votes

(I mean once the my.ini has been modified). I have also tried to do it putting the path of the bin folder from cmd(with and without admin permission). When I put mysql I get the same error as from the xammp shell. Typing mysqld gives me this other error: 2020-04-26 15:21:49 0 [Note] mysqld (mysqld 10.4.6-MariaDB) starting as process 5700 ... 2020-04-26 15:21:49 0 [Warning] Can't create test file c:\xampp73\mysql\data\LAPTOP-RA30SDBC.lower-test mysqld: Can't change dir to 'c:\xampp73\mysql\data\' (Errcode: 2 "No such file or directory") 2020-04-26 15:21:49 0 [ERROR] Aborting .

0 votes

I just noticed that the error says that it is trying to create a test file in a non-existent folder: `c: \xampp73\mysql\data `... Do you know where that route is configured, to change it for the good one, removing the 73?

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X