the MySQL service on local computer started and then stopped

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

    If you came across this while installing WAMP64 on Windows 10. Check if data folder in MySQL folder is missing. My WAMP 3.2.3 version installation failed to create such a folder. So wamp icon was orange (1 of 2 services running).

    A quick fix was to run this command from MySQL location.

    C:\wamp64\bin\mysql\mysql5.7.31\bin\
    mysqld --initialize-insecure
    
    0 讨论(0)
  • 2020-11-30 22:38

    Search for services.msc and look up through your services that are running if there is a mysql service running already other than the one you want to run (it could be xampp or wamp) or another service (for example Skype) using the same port as mysql and stop the service so you can run your mysql service.

    0 讨论(0)
  • 2020-11-30 22:39

    Using Community 8.0.17, upgraded from 8.0.16

    There may be a more secure way of doing this, but since I'm just running a dev box:

    1. navigate to the \data folder
    2. make SURE the \data folder is EMPTY. If files exist the --initialize option will fail
    3. give SYSTEM Full Control permissions on the \data folder
    4. go back to your command prompt
    5. run mysqld --initialize

    you should see all of the required data file structures in the data folder now. If they are not created, the mysqld process has contention or improper security to write into the folder correctly.

    Now start your named service in whatever fashion you want (SC/NET/service.msc, etc)

    Assuming all of the files were created properly by --initialize the service will start.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2020-11-30 22:40
    1. Open Service
    2. Right click on MYSQL service
    3. select Log on
    4. check local system account
    5. start service
    0 讨论(0)
  • 2020-11-30 22:41

    Rename or delete the folder under,

    C:\ProgramData\MySQL\MySQL Server 5.7

    folder name change as per your MYSQL version number.

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