MySQL not working after updating to Windows 8.1 [closed]

早过忘川 提交于 2019-12-05 04:06:36

Well, Uninstalling workbench and re-installing it did the trick. All Schemas were not deleted

Reinstalling the mysqld service will indeed get the database server to start up again, but you will find that your databases are missing, as are all your user details!

Under Windows 8, MySQL stores its databases under C:\ProgramData\MySQL\MySQL Server 5.5\data while under 8.1 it has all moved to C:\Program Files\MySQL\MySQL Server 5.5\data.

The quick solution to this is:

  • Stop the mysqld service via MySQL Notifier in the task bar
  • Copy C:\ProgramData\MySQL\MySQL Server 5.5 to C:\Program Files\MySQL\MySQL Server 5.5
  • Restart the mysqld service via the Notifier.

Hey presto, your databases and user credentials are back.

After upgrade to Windows 8.1 you either need to run the MySQL config wizard

http://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard-starting.html

But I could not get that to work, so had to reinstall the MySQL Server.

Then to install it as a service, and point to my earlier databases:

mysqld --install MySQL --defaults-file=C:\MySQL\data\my.ini

Check it's working by running

mysql -u username -p password
show databases;

In my case, the service of mysql was missing. Reinstalling the service with the following command:

mysqld --install [Instance Name] --defaults-file=[My SQL Configuration File]

so, if my install the service, with MySQL is the instance name, and D:\MySQL\my.ini was my previous configuration file, I executed the following command:

mysqld --install MySQL --defaults-file="D:\MySQL\my.ini"

Then start the service as usual. That should do the trick.

Note: You have to execute those command in a command prompt with elevated privilege.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!