the MySQL service on local computer started and then stopped

前端 未结 24 3209
抹茶落季
抹茶落季 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:39

    Follow the below instruction as below to save your day:

    If you modify my.ini not correct, you will find the trouble "the MySQL service on local computer started and then stopped". So you need to check your my.ini in "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" again to make sure there is no strange command. If you don't know and want to restore to original, you can search on web with key word "my.ini configuration", download the latest and copy it to "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"

    For whom delete the SQL service on Window or Linux, You can follow these step below:

    (Window)

    Delete Current Service

    You need to stop MySQL80/MySQLXX in Service before carry out the action below Open commandLine of Window and run as administrator

    sc delete mysql80 <= If you use mysql80, it will delete MySQL80 in Service

    sc delete mysql <= If you use "mysql --initliaze", it will delete MySQL in Service

    The command mysqld --initialize just create MySQL in Service of Window or Linux

    So when you check it Path Executable, it misses my.ini so you can't use you MySQL Server although MySQL Service is working

    For MySQL80

    "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --install MySQL80 --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"

    For MySQLXX

    "C:\Program Files\MySQL\MySQL Server X.X\bin\mysqld.exe" --install MySQLXX --defaults-file="C:\ProgramData\MySQL\MySQL Server X.X\my.ini"

    => It will create MySQLXX Service working with my.ini

    Then MySQL works normally and you won't need to install your MySQL again.

    I don't use Linux or Mac so I can't instruct - But you can find the answer above for reference

提交回复
热议问题