Start MySQL Server as a service (Win 8)(将 MySQL 服务器作为服务启动 (Win 8))
问题描述
I am trying out MySQL (Windows 8), with the workbench (gui) installed as well.
I am still in the installation / configuration process. I would like to create a new database. So, on the workbench's welcome screen, I have selected New Server Instance- Register a new Server instance to manage.
In order to do this, I have went through following configuration steps:
Specify
localhostas server host,Give it the username and password I am using.
It then tests a database connection, and, in the next step, asks me to
Select the Service to manage from the list below. It will also help find the configuration file.
However, the list of possible Services is empty and if I click [next], it says
Error: In Order to manage a MySQL Service it must be installed as a Service. The wizard can not find any MySQL Service at the target machine, so the Server instance cannot be started.
I think that I have to somehow start the MySQL Service, as it might already been installed when I had installed the whole MySQL Toolset.
So: How would I start this MySQL Service under Windows 8?
Some things I've tried:
The Manual says to try:
C:> "C:Program FilesMySQLMySQL Server 5.1inmysqld"
in order to install it as a Service. Yet, nothing happens and I get the following (some verbose [Note]s were removed):
2013-04-13 23:44:22 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
2013-04-13 23:44:22 2592 [Warning] Can't create test file c:Program FilesMySQL
MySQL Server 5.6datagast.lower-test
2013-04-13 23:44:22 2592 [Warning] Can't create test file c:Program FilesMySQL
MySQL Server 5.6datagast.lower-test
[...]
2013-04-13 23:44:22 2592 [ERROR] InnoDB: read can't be opened in .ibdata1 mode
2013-04-13 23:44:22 2592 [ERROR] InnoDB: The system tablespace must be writable!
2013-04-13 23:44:22 2592 [ERROR] Plugin 'InnoDB' init function returned error.
2013-04-13 23:44:22 2592 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGIN
E failed.
2013-04-13 23:44:22 2592 [ERROR] Unknown/unsupported storage engine: InnoDB
2013-04-13 23:44:22 2592 [ERROR] Aborting
2013-04-13 23:44:22 2592 [Note] Binlog end
[...]
2013-04-13 23:44:22 2592 [Note] mysqld: Shutdown complete
To install the server as a service, I've used this command (per the manual).
C:> "C:Program FilesMySQLMySQL Server 5.1inmysqld" --install
Again, "nothing" happens, I get (again, most of the verbose [Note]s are removed):
Install/Remove of the Service Denied!
c:Program FilesMySQLMySQL Server 5.6in>mysqld -p --install
2013-04-13 23:43:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
2013-04-13 23:43:24 3764 [Warning] Can't create test file c:Program FilesMySQL
MySQL Server 5.6datagast.lower-test
2013-04-13 23:43:24 3764 [Warning] Can't create test file c:Program FilesMySQL
MySQL Server 5.6datagast.lower-test
[...]
2013-04-13 23:43:24 3764 [ERROR] InnoDB: read can't be opened in .ibdata1 mode
2013-04-13 23:43:24 3764 [ERROR] InnoDB: The system tablespace must be writable!
2013-04-13 23:43:24 3764 [ERROR] Plugin 'InnoDB' init function returned error.
2013-04-13 23:43:24 3764 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGIN
E failed.
2013-04-13 23:43:24 3764 [ERROR] mysqld: unknown option '-p'
2013-04-13 23:43:24 3764 [ERROR] Aborting
2013-04-13 23:43:24 3764 [Note] Binlog end
[...]
2013-04-13 23:43:24 3764 [Note] mysqld: Shutdown complete
Type cmd in start and right click and Run as administrator,
then paste the below text in your command prompt,
"C:Program Files (x86)MySQLMySQL Server 5.1inmysqld" --install
If you don't run cmd as Administrator, you'll see Install/Remove of service denied.,
So run the elevated command prompt(Start->cmd->Run as Administrator) to see the Service Successfully installed message.
Note: This is even if you have logged in as administrator in windows 7/8.
If u want to uninstall the service do the following, copy paste the following in command prompt(again elevated command prompt) run this,
sc delete MySQL
Here MySQL in the command is the service name mysql creates by default in Windows PC. Make sure you see the service is installed in the Services List(Task Manager -> Services Tab -> Check the Mysql service Name column).
这篇关于将 MySQL 服务器作为服务启动 (Win 8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 MySQL 服务器作为服务启动 (Win 8)
基础教程推荐
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 无法解决整理冲突 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
