简体   繁体   中英

Error in starting MYSQL in XAMPP

When I start xampp it gives me an error in mysql. I'm using windows 10.
Here is the contents of error log:

2015-11-10 15:26:56 10fc 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.
2015-11-10 15:26:56 4348 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-11-10 15:26:56 4348 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-10 15:26:56 4348 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-11-10 15:26:56 4348 [Note] InnoDB: Memory barrier is not used
2015-11-10 15:26:56 4348 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-11-10 15:26:56 4348 [Note] InnoDB: Not using CPU crc32 instructions
2015-11-10 15:26:56 4348 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-11-10 15:26:56 4348 [Note] InnoDB: Completed initialization of buffer pool
2015-11-10 15:26:56 4348 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-10 15:26:57 4348 [Note] InnoDB: 128 rollback segment(s) are active.
2015-11-10 15:26:57 4348 [Note] InnoDB: Waiting for purge to start
2015-11-10 15:26:57 4348 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835027
2015-11-10 15:26:57 6140 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-11-10 15:26:57 4348 [Note] Plugin 'FEEDBACK' is disabled.
2015-11-10 15:26:57 4348 [Note] Server socket created on IP: '::'.
2015-11-10 15:26:57 4348 [Note] Event Scheduler: Loaded 0 events
2015-11-10 15:26:57 4348 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
2015-11-10 15:27:11 5152 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

When I opened XAMPP and click start MySQL button it gives me an error.

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

UPDATE

Here is the screenshot: 在此处输入图像描述

  1. First: Close Xampp.

  2. Second: Go to \\xampp\\mysql\\backup.

  3. Third: Copy all files in the directory.

  4. Fourth: Go to \\xampp\\mysql\\data.

  5. Fifth: Paste the files that you copied from \\xampp\\mysql\\ backup (Replace the files when asked).

  6. Sixth: Start Xampp.

Follow these steps properly and carefully.

  1. This error is caused because there is already MySQL installed (of different version) which is using port 3306.

  2. On the xampp control panel you will find 'MySQL' and several options like Start, Config, etc beside that.

  3. Select Config and open the file named 'my.ini'. It should open in a notepad. Press Ctrl + F and Find '3306' and change it to 3308 and Save the file. NOTE: YOU WILL FIND 5 INSTANCES OF 3306. CHANGE ALL OF THEM TO 3308.

  4. Now Open the Config which is located on the top-right of the Xampp control panel. A window should appear. Find 'Service and Port setting'. Click the button and once again a window should appear.

5.On the MySQL tab type '3308'. And Save the changes.

6.Search 'services.msc' on Windows search. A Window should popup. Scroll down until you find 'MySQL'.

  1. Right click on MySQL and select STOP.

  2. Now Run Command Prompt as administrator and type the following command.

sc delete mysql

  1. This will successfully delete previously installed mysql.

  2. Quit the xampp control panel completely and start a new fresh one.

  3. Now your MySQL should be up and running.

Probably your 3306 or whatever you use is being used by other applications. May be you don't know that XAMPP usually has problems with apps like Skype. If you are running Skype try to close it and open XAMPP. You can also change default ports for HTTP and MySQL.

To Edit Apache ports open apache.conf and restart the server.

To Edit MySql ports open my.cnf and restart the service.

You may also take a look to this post. May be you need to delete your DB files due corruption but it may be not the reason if you just installed fresh Xampp instance.

XAMPP - MySQL shutdown unexpectedly

UPDATE

Here you have a good screenshot of how to change ports on Skype if you prefer.

https://stackoverflow.com/a/16351807/3518053

The problem is that you have two instances of mysql installed in your computer. Check if the process mysqld.exe is already running via task manager and terminate it if present. Then open services.msc via run and remove all instances of mysql if any(terminate it before removing), reboot your machine and run XAMPP again. This will solve your problem.

I came across a similar problem, you can try this here

Remember to backup your data first!

Using cmd as administrator uninstall

  • xampp
  • all mysql database
  • mysql service

then remove the service using sc delete and remove all directory of XAMPP. Then reinstall it again.

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