Home  >  Q&A  >  body text

c# - 用代码启动mysql服务出错, unknown variable ''default-file=D:\..'

代码:

这是安装的服务

报错:

巴扎黑巴扎黑2743 days ago684

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:42:26

    may be a spelling mistake: --default-file should be changed to --defaults-file and try, pay attention to the last s, defaults

    I’ll give you two more references:

    "D:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" --defaults-file="D:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56
    "C:\Program Files\MariaDB 10.0\bin\mysqld.exe" "--defaults-file=C:\Program Files\MariaDB 10.0\data\my.ini" "MariaDb"

    reply
    0
  • 阿神

    阿神2017-04-17 15:42:26

    Is it possible to manually start it in the service? Also check whether it has permission?

    reply
    0
  • Cancelreply