the MySQL service on local computer started and then stopped

前端 未结 24 3056
抹茶落季
抹茶落季 2020-11-30 21:59

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 resol

相关标签:
24条回答
  • 2020-11-30 22:59

    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.

    0 讨论(0)
  • 2020-11-30 23:00

    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

    0 讨论(0)
  • 2020-11-30 23:01

    If using version 8 and you edit the my.ini I found that Notepad is putting 3 hex characters at the beginning of the my.ini file. EF BB BF. Deleting the 3 characters from the beginning of the file in a hex editor fixes the problem.

    In version 8 they are accidentally putting Unicode characters in the ini file. This is causing Notepad to save the file with Byte order mark characters.

    The following line in the file is the culprit "The line # range from 1 to 2^32 − 1. “Unique” means that each ID must be different." has 3 Unicode characters. This is causing notepad to append the byte order mark to the text file.

    0 讨论(0)
  • 2020-11-30 23:02

    This problem is so complicated and depend on MySQL Version.My problem was happened on MySQL 8.0.2. When I've config my.ini file on notepad and save it.I soleved following @jhersey29 solution https://stackoverflow.com/a/55519014/1764354 but little different approch.

    my solution is restore my.ini file and edit config value via Option files on WorkBench Application. workBench Menu Example

    0 讨论(0)
  • 2020-11-30 23:03

    After installing it by mysqld --install. Try this mysqld --initialize. We got the same problem but it's now working.

    0 讨论(0)
  • 2020-11-30 23:03

    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.

    0 讨论(0)
提交回复
热议问题