NET HELPMSG 3534
问题:在安装MqSql的5.7.12版本时,在注册服务mysqld install MySQL --defaults-file="my-default.ini路径"后执行net start mysql,启动MySql失败。
根源:那是因为5.7版本后没有旧版的data目录了,需要执行mysqld --initialize命令初始化下,手动生成data目录。官方解释为:
As of MySQL 5.7.6, the Zip Archive no longer includes a data directory. To initialize a MySQL installation by creating the data directory and populating the tables in the mysql system database, initialize MySQL using either --initialize or --initialize-insecure. For additional information, see Section 2.10.1.1, “Initializing the Data Directory Using mysqld”.
解决:
1.移除已注册服务:mysqld remove
2.初始化:mysqld --initialize
3.注册服务:mysqld -install
4.启动服务:net start mysql
然后就可以正常启动了.