The MySQL57 service on Local Computer started and then stopped

后端 未结 3 1312
梦谈多话
梦谈多话 2021-01-12 07:33

When I try to start my SQL server, a message pops up saying that it starts but then stops. This happened after a restart on my server.

Does anyone know how I can fi

相关标签:
3条回答
  • 2021-01-12 07:52

    add to config file my.inf on C:\ProgramData\MySQL\MySQL Server 5.7

    [mysqld]
    tmpdir=C:/temp
    

    and everything will work fine .

    0 讨论(0)
  • 2021-01-12 08:00

    Please try the following steps:

    1. run 'cmd' as administrator,
    2. cd to your SQL folder,
    3. run 'mysqld --initialize --user=mysql --console' to reset and
    4. run 'net start mysql' to start the service.
    0 讨论(0)
  • 2021-01-12 08:11

    Make sure that the data directory has full permissions set for users "Network Service" and Administrator and that you have quotes around the name of the directory if there are spaces in it. Make sure that basedir is set / not commented out.

    I tested these things by changing the data directory, which re-caused the error you describe above exactly, then fixed the permissions of the newly created data directory to eliminate the error. I can switch back and forth now my changing which data directory I comment out. (only as a test, otherwise that's kind of nuts).

    C:\ProgramData\MySQL\MySQL Server 5.7\my.ini Should be something like this, using Windows 2012 R2 server to test:

    # Path to installation directory. All paths are usually resolved relative to 
    this.
    basedir="C:/Program Files/MySQL/MySQL Server 5.7/"
    
    # Path to the database root
    # datadir="C:/ProgramData/MySQL/MySQL Server 5.7/Data"
    datadir="d:/ProgramData/Data"  
    
    0 讨论(0)
提交回复
热议问题