the MySQL service on local computer started and th

2020-02-02 04:27发布

the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

Can anyone resolve this issue? Thanks.

17条回答
Evening l夕情丶
2楼-- · 2020-02-02 04:57

In my case, mysqld was starting and stopping with no error message. I needed to open command prompt using "Run as Administrator", and then run mysqld.

I am only doing this for temporary development. I would not recommend running MySQL as an administrator in any case.

This was the final step after the above troubleshooting.

查看更多
该账号已被封号
3楼-- · 2020-02-02 04:58

You also might have accidentally added some wrong text in my.ini file. Make sure no invalid character is added at the beginning on the file.

查看更多
时光不老,我们不散
4楼-- · 2020-02-02 04:59

This may be because of changing lower_case_table_names after a server has been already initialized.

From the docs:

lower_case_table_names can only be configured when initializing the server. Changing the lower_case_table_names setting after the server is initialized is prohibited.

The solution to this problem is to set lower_case_table_names parameter at server installation as described in the following answer:

Can't set lower_case_table_names in MySQL 8.x on Windows 10

查看更多
Anthone
5楼-- · 2020-02-02 05:00

The same problem happened with me also, noting worked... I first deleted the service (in my case MySQL80 and MySQL) by command:

sc delete MySQL80
sc delete MySql

and then reinstalled MySQL. Mine was MySQL 8.0. And then everything was back to normal.

查看更多
虎瘦雄心在
6楼-- · 2020-02-02 05:04

Also remember to give NETWORK SERVICE permission to the folder:

  1. Right-click Data folder
  2. Select Properties
  3. Select Security tab
  4. Click Advanced
  5. Click Change Permissions...
  6. Click Add...
  7. Type NETWORK SERVICE
  8. Click Check Names
  9. Click OK
  10. Select Full Control
  11. Click OK – four times
  12. Start MySQL service
查看更多
我只想做你的唯一
7楼-- · 2020-02-02 05:05

If you have changed data directory (the path to the database root in my.ini) to an external hard drive, make sure that the hard drive is connected.

查看更多
登录 后发表回答