Xampp mysql Error: MySQL shutdown unexpectedly

你离开我真会死。 提交于 2021-02-08 14:57:38

问题


when I starting mysql, giving the following error:

17:43:13  [mysql]   Error: MySQL shutdown unexpectedly.
17:43:13  [mysql]   This may be due to a blocked port, missing dependencies, 
17:43:13  [mysql]   improper privileges, a crash, or a shutdown by another method.
17:43:13  [mysql]   Press the Logs button to view error logs and check
17:43:13  [mysql]   the Windows Event Viewer for more clues
17:43:13  [mysql]   If you need more help, copy and post this
17:43:13  [mysql]   entire log window on the forums

then, I check the mysql_error.log:

    2017-05-03 17:39:39 202c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in        future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
    170503 17:39:39 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    170503 17:39:39 [Note] InnoDB: The InnoDB memory heap is disabled
    170503 17:39:39 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    170503 17:39:39 [Note] InnoDB: Memory barrier is not used
    170503 17:39:39 [Note] InnoDB: Compressed tables use zlib 1.2.3
    170503 17:39:39 [Note] InnoDB: Not using CPU crc32 instructions
    170503 17:39:39 [Note] InnoDB: Initializing buffer pool, size = 16.0M
    170503 17:39:39 [Note] InnoDB: Completed initialization of buffer pool
    170503 17:39:39 [Note] InnoDB: Highest supported file format is Barracuda.
    170503 17:39:39 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600674 in         the ib_logfiles!
    170503 17:39:39 [Note] InnoDB: Database was not shutdown normally!
    170503 17:39:39 [Note] InnoDB: Starting crash recovery.
    170503 17:39:39 [Note] InnoDB: Reading tablespace information from the .ibd files...
    170503 17:39:39 [Note] InnoDB: Restoring possible half-written data pages 
    170503 17:39:39 [Note] InnoDB: from the doublewrite buffer...
    170503 17:39:39 [Note] InnoDB: 128 rollback segment(s) are active.
    170503 17:39:39 [Note] InnoDB: Waiting for purge to start
    170503 17:39:40 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.22-72.0 started; log sequence number 1600674
    170503 17:39:40 [Note] Plugin 'FEEDBACK' is disabled.
    170503 17:39:40 [Note] Server socket created on IP: '::'.   

finally, I moved xampp/mysql/backup files into xampp/mysql/data and run mysql again.Then, it worked!But I don't know why.What led to this problem.

Hope someone doubts for me!


回答1:


If you're not running XAMPP as an administrator, shutting down MySQL can cause corruption which means you have to repair or delete your tables. This can easily be avoided by running XAMPP as administrator.




回答2:


  • Open Services on XAMPP Control Panel
  • Look for the service MySQL80, right click on this service and click Stop
  • Get back to XAMPP Control Panel and start MySQL



回答3:


I searched on google and tried everything like port changing, delete files, reinstall xampp, copy and paste backup files to mysql/data folder but nothing worked.

I found the best solution to this problem.

Solution:

  1. go to xampp/mysql/data and take a backup of this folder
  2. delete all selected files in the below image
  3. Copy selected files in below image from xampp/mysql/backup and paste it to xampp/mysql/data folder
  4. Now restart your xampp server and it will run like before. no need to delete your database or reinstall your xampp server


来源:https://stackoverflow.com/questions/43757141/xampp-mysql-error-mysql-shutdown-unexpectedly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!