0

I installed XAMPP on Windows 8 (64bit). In XAMPP Control Panel i can't start mySQL. I changed the port of mySQl in "C:/xampp/mysql/bin/my.ini" from 3306 to 3307 according to that link:

xampp MySQL does not start

now the code in "my.ini" changed to:

[client] 
# password       = your_password 
port            = 3307
socket          = "C:/xampp/mysql/mysql.sock"


# Here follows entries for some specific programs 

# The MySQL server
[mysqld]
port= 3307
socket = "C:/xampp/mysql/mysql.sock"

Now it still gives that error:

11:31:48 AM  [mysql]    Attempting to start MySQL service...
11:31:56 AM  [mysql]    Status change detected: running
11:32:01 AM  [mysql]    Status change detected: stopped
11:32:01 AM  [mysql]    Error: MySQL shutdown unexpectedly.
11:32:01 AM  [mysql]    This may be due to a blocked port, missing dependencies, 
11:32:01 AM  [mysql]    improper privileges, a crash, or a shutdown by another method.
11:32:01 AM  [mysql]    Press the Logs button to view error logs and check
11:32:01 AM  [mysql]    the Windows Event Viewer for more clues
11:32:01 AM  [mysql]    If you need more help, copy and post this
11:32:01 AM  [mysql]    entire log window on the forums

I deleted "ibdata1" file in "C:\xampp\mysql\data".

also stopped mysql56 service.

Any help is appreciated. Thanks

Shalaw Majeed
  • 11
  • 1
  • 1
  • 1

4 Answers4

1

Check the error logs to view more details on the subject. Check that mysql and mysqli port options in my.ini and php.ini and in config.inc.php match and are 3307.

In case MySQL Server has crashed you might want to take a look at Forcing InnoDB Recovery

In addition take also a look at this solution in case it is a 3rd party software issue.

  • How is php.ini related to mysql shutdown unexpectedly? – Jigar Mar 04 '18 at 08:38
  • 1
    @Jigar this is a more detailed solution. To be more accurate one needs to see error log. Thanks for the comment, previous answer was not an answer. –  Mar 05 '18 at 11:34
0

Just like @Peter said, you need to change that file configuration.

Try to change this in your xampp folder ex: C:\xampp\php\php.ini:

mysql.default_port=3307
mysqli.default_port=3307

And change this parameter in your xampp folder ex: C:\xampp\mysql\bin\my.ini :

[client] 
# password       = your_password 
port            = 3307
socket          = "C:/xampp/mysql/mysql.sock"

[mysqld]
port= 3307
Eko Junaidi Salam
  • 1,663
  • 1
  • 18
  • 26
0

To fix this issue,

  1. Right click and open task manager
  2. kill process "mysqld".
  3. Open Xampp and start MySQL.

This really works!!

References: https://www.youtube.com/watch?v=jcaqDv0f8K4

0

Just open task manager and forcefully end the task named mysqld.exe. And then try once again.