尽管我拥有完全管理员权限,但无法在 Windows 10 计算机上启动 MariaDB 服务

尽管我拥有完全管理员权限,但无法在 Windows 10 计算机上启动 MariaDB 服务

在工作中我第一次使用 Windows 10,并且在启动服务时遇到了困难。

我从官方主页下载了最新版本的 MariaDB .zip 文件:https://downloads.mariadb.org/mariadb/10.4.8/

通过命令行(以管理员身份启动),我运行

mysql_install_db.exe --datadir=C:\lpDB --service=lpDB --password=root -o --port=3306

并得到以下输出:

Running bootstrap
Executing ""C:\Users\NicStar\Applications\DBMS\mariadb-10.4.8-winx64\mariadb-10.4.8-winx64\bin\mysqld.exe" --no-defaults --console --innodb-page-size=16384 --bootstrap "--lc-messages-dir=C:/Users/NicStar/Applications/DBMS/mariadb-10.4.8-winx64/mariadb-10.4.8-winx64/share" --basedir=. --datadir=. --default-storage-engine=myisam --max_allowed_packet=9M  --net-buffer-length=16k"
2019-10-25 10:35:12 0 [Note] C:\Users\NicStar\Applications\DBMS\mariadb-10.4.8-winx64\mariadb-10.4.8-winx64\bin\mysqld.exe (mysqld 10.4.8-MariaDB) starting as process 2756 ...
InnoDB: using atomic writes.
2019-10-25 10:35:12 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-10-25 10:35:12 0 [Note] InnoDB: Uses event mutexes
2019-10-25 10:35:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-10-25 10:35:12 0 [Note] InnoDB: Number of pools: 1
2019-10-25 10:35:12 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-10-25 10:35:12 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-10-25 10:35:12 0 [Note] InnoDB: Completed initialization of buffer pool
2019-10-25 10:35:12 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-10-25 10:35:12 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-10-25 10:35:12 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-10-25 10:35:12 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2019-10-25 10:35:12 0 [Note] InnoDB: Waiting for purge to start
2019-10-25 10:35:12 0 [Note] InnoDB: 10.4.8 started; log sequence number 139827; transaction id 21
2019-10-25 10:35:12 0 [Note] InnoDB: Loading buffer pool(s) from C:\lpDB\ib_buffer_pool
2019-10-25 10:35:12 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-10-25 10:35:12 0 [Note] InnoDB: Buffer pool(s) load completed at 191025 10:35:12
Removing default user
Setting root password
Creating my.ini file
Registering service 'lpDB'
Creation of the database was successful

然后我尝试运行该服务,首先通过命令行:

sc start lpDB

但我收到一个错误:

[SC] StartService ERROR 5:

Access denied

据我所知,我对这台机器拥有完全的管理权限,但正如我所说,这是我第一次使用 Windows 10,所以我可能遗漏了一些东西。

因此,接下来我尝试运行 services.exe。我尝试启动和停止我知道安全的随机服务,看看是否可以,一切都很顺利。然后我搜索了名为 lpDB 的 mariaDB 服务并尝试启动它。现在我得到了与弹出窗口相同的错误。

到目前为止,我已经浪费了一个半小时,用尽了我所知道的所有方法。我就是找不到我遗漏了什么。请帮忙。

顺便说一句:我找到了故障排除网站https://mariadb.com/kb/en/library/installation-issues-on-windows/但它对我没有帮助。我确实以完全管理员权限运行了命令提示符,但仍然出现错误。

答案1

从命令行运行以下命令将其作为 Windows 中的服务安装(假设您的路径mysqld是正确的;我将按照您上面的输出进行操作)。

C:\Users\NicStar\Applications\DBMS\mariadb-10.4.8-winx64\mariadb-10.4.8-winx64\bin\mysqld --install

这应该会导致“MySQL”出现在服务列表中控制面板,在管理工具中。在那里,您可以将其设置为在启动时自动启动,可以停止它、启动它、重新启动它等。

相关内容