简体   繁体   中英

XAMPP error with running MySQL

I have problem witch XAMPP. When I try to run MySQL, XAMPP shows this:

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

I've changed ports to 3307 in C:\\xampp\\mysql\\bin\\my.ini and in C:\\xampp\\php\\php.ini to mysql.default_port=3307 mysqli.default_port=3307 .

I've also deleted ib_logfile1 in C:\\xampp\\mysql\\data , but it still doesn't work. Error logs:

2017-08-17 12:27:00 2050 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.
2017-08-17 12:27:00 8272 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB. `

2017-08-17 12:27:00 8272 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-08-17 12:27:00 8272 [Note] InnoDB: The InnoDB memory heap is disabled
2017-08-17 12:27:00 8272 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-08-17 12:27:00 8272 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2017-08-17 12:27:00 8272 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-17 12:27:00 8272 [Note] InnoDB: Using generic crc32 instructions
2017-08-17 12:27:00 8272 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2017-08-17 12:27:00 8272 [Note] InnoDB: Completed initialization of buffer pool
2017-08-17 12:27:00 8272 [Note] InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist: a new database to be created!
2017-08-17 12:27:00 8272 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
2017-08-17 12:27:00 8272 [ERROR] InnoDB: Cannot create C:\xampp\mysql\data\ib_logfile101
2017-08-17 12:27:00 8272 [ERROR] Plugin 'InnoDB' init function returned error.
2017-08-17 12:27:00 8272 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-08-17 12:27:00 8272 [Note] Plugin 'FEEDBACK' is disabled.
2017-08-17 12:27:00 8272 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-08-17 12:27:00 8272 [ERROR] Aborting

Any help is appreciated. Thanks

MySQL is telling you exactly why it cannot start:

[ERROR] InnoDB: Cannot create C:\\xampp\\mysql\\data\\ib_logfile101

Hence I suggest the first thing you do is to check that c:\\xampp\\mysql\\data exists and is writeable by the DBMS user.

First stop the service on the xampp control panel, then click on the red cross on the left to install the service on your computer, then the icon will become a green tick, then start the service as administrator.

It should be working alright.

  1. Open the XAMPP control panel and stop the actions.
  2. Open services and go to MySql80.
  3. Stop the service.
  4. Start the service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM