MariaDB on Windows - what is this error when trying to start the database engine?

一个人想着一个人 提交于 2020-01-01 01:16:08

问题


I am asking this question as an offshoot myself and another SO had from this other MariaDB question: MariaDB on Windows - getting started help?

When I install MariaDB (v5.2.4), open the command window, navigate to the folder where the files are installed, and type in the following to start the database:

net start mysql

I get the following error:

the service name is invalid

I didn't do anything complex, just ran the installation and tried to get started. Any ideas?


回答1:


The error basically tells that installer did not create the service (it currently does not create services), thus you'll need to do it yourself.

  • start elevated command line
  • switch to directory of your MariaDB installation (C:\Program Files\MariaDB 5.2.4, something like that)
  • bin\mysqld --install

and only then

  • net start mysql

Assuming that there is nothing that runs on port 3306, this will stat.

Alas, the server you will create this way would not be optimized at all. It is better to create a configuration file my.ini (take a look at MySQL docs and .ini files in the installation directory for examples), and put with performance -related stuff here (innodb bufferpool size etc). With config file, you'll need a different command line to register service (step 3 above):

  • bin\mysqld --install MySQL --defaults-file=path\to\my.ini

Installer for 5.2.4 is basic indeed. It is being reworked though, new one is going to be better usable.




回答2:


I installed MariaDB that comes with XAMPP on Windows 10. You will see only mysql in the XAMPP Control Panel. However, if you click Shell on the control panel you can access MariaDB monitor and MariaDB.
Here are some notes: http://hodentekhelp.blogspot.com/2015/11/how-do-you-access-mariadb-in-xampp.html



来源:https://stackoverflow.com/questions/4962342/mariadb-on-windows-what-is-this-error-when-trying-to-start-the-database-engine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!