简体   繁体   English

运行 MySQL 时出现 XAMPP 错误

[英]XAMPP error with running MySQL

I have problem witch XAMPP.我有问题女巫 XAMPP。 When I try to run MySQL, XAMPP shows this:当我尝试运行 MySQL 时,XAMPP 显示:

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 .我已将C:\\xampp\\mysql\\bin\\my.iniC:\\xampp\\php\\php.ini中的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.我还删除了C:\\xampp\\mysql\\data ib_logfile1 ,但它仍然不起作用。 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: MySQL确切地告诉您为什么它无法启动:

[ERROR] InnoDB: Cannot create C:\\xampp\\mysql\\data\\ib_logfile101 [错误] InnoDB:无法创建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. 因此,我建议您要做的第一件事是检查c:\\ xampp \\ mysql \\ data是否存在并且可由DBMS用户写入。

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. 首先在xampp控制面板上停止该服务,然后单击左侧的红叉以在您的计算机上安装该服务,然后该图标将变为绿色的勾号,然后以管理员身份启动该服务。

It should be working alright. 它应该工作正常。

  1. Open the XAMPP control panel and stop the actions.打开 XAMPP 控制面板并停止操作。
  2. Open services and go to MySql80.打开服务,进入MySql80。
  3. Stop the service.停止服务。
  4. Start the service.启动服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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