Friday, July 31, 2015

MySQL does not Work on Windows 10

If you recently upgraded to Windows 10 and found MySQL no longer functional, you are not alone. Yesterday, I bravely (code for naively) decided to apply the free Windows 10 upgrade despite the possibility of it messing me up on the job. Although the upgrade went smooth overall, the following error appeared when I tried to connect via MySQL through PHP:

"No connection could be made because the target machine actively refused it. "

After writing a simple one line test program, I was able to rule out PHP and Apache Web Server as the culprit(s). Since I opted to install the upgrade on the first day Windows 10 was released, no help was available on the Internet. Nonetheless, I was able to correct the problem by uninstalling MySQL through the .msi install/uninstall utility provided by MySQL. In my case, I had to completely uninstall even the data files - be sure you have a good backup! After reinstalling, MySQL worked like a charm but of course I had to restore the backup first.

On a prior Windows upgrade, the same issue occurred only last time it did not require deleting the MySQL data files. I recommend trying to preserve the database if possible. If you do elect to remove the MySQL data files, be sure you have multiple backups! If you can log in to the MySQL Command Line Client afterwards using the password you chose during the install, the problem has been resolved and it is just a question now of restoring your backup database.

No comments:

Post a Comment