title: MariaDB install: I unchecked running as service during installation. What is correct way to start and stop mariadb?
body: <p>Now, I don't know how to start mariadb since I didn't install it as a running service.</p>
  
  <p>This didn't help me:
  <a href="https://mariadb.com/kb/en/mariadb/starting-and-stopping-mariadb/" rel="noreferrer">https://mariadb.com/kb/en/mariadb/starting-and-stopping-mariadb/</a></p>
  
  <p>I googled and thought this would work to set it as a service:</p>
  
  <p>C:\Program Files\MariaDB 10.0\bin>mysql_install_db.exe --datadir=c:\mariadb --service=MyDB --password=secret
  Running bootstrap
  Removing default user
  Setting root password
  Creating my.ini file
  Registering service 'MyDB'
  FATAL ERROR: OpenSCManager failed (5)</p>
  
  <p><a href="http://kb.askmonty.org/v/installation-issues-on-windows" rel="noreferrer">http://kb.askmonty.org/v/installation-issues-on-windows</a> contains some help
  for solving the most common problems.  If this doesn't help you, please
  leave a comment in the Knowledgebase or file a bug report at
  <a href="http://mariadb.org/jira" rel="noreferrer">http://mariadb.org/jira</a></p>
  
  <hr>
  
  <p>I then went and issued this command:
  C:\Program Files\MariaDB 10.0\bin>mysqld.exe --datadir=../data</p>
  
  <p>But it just stays there blinking.  Yes, I can connect to maria db with Heidisql, but does the above command prompt suppose to blink one line under the above command?</p>
  
  <p>Now, I don't know how to shutdown the database.  I went to the documentation and can't find this command:  mysql.server stop</p>
  
  <p>But there's no such command / script for windows 7.</p>
  
  <p>I tried:</p>
  
  <p>C:\Program Files\MariaDB 10.0\bin>mysqladmin -u root -p shutdown
  Enter password: ********
  mysqladmin: connect to server at 'localhost' failed
  error: 'Can't connect to MySQL server on 'localhost' (10061 "Unknown error")'
  Check that mysqld is running on localhost and that the port is 3306.
  You can check this by doing 'telnet localhost 3306'</p>
  
  <p>I'm using windows 7.</p>
  
  <p>I've read 
  <a href="http://dev.mysql.com/doc/mysql-startstop-excerpt/5.0/en/windows-server-first-start.html" rel="noreferrer">http://dev.mysql.com/doc/mysql-startstop-excerpt/5.0/en/windows-server-first-start.html</a></p>
  
  <p>that to start the server I run inside the bin directory mysqld --console</p>
  
  <p>I ran this command to stop mariadb, but it didn't seem to work:</p>
  
  <p>C:\Program Files\MariaDB 10.0\bin>mysqladmin shutdown -p
  Enter password: ********
  mysqladmin: connect to server at 'localhost' failed
  error: 'Access denied for user 'ODBC'@'localhost' (using password: YES)'</p>
  
  <p>I'm able to connect still.</p>
  
  <p>What's the correct way for me to start and stop maria db (latest version 3/15/2015) on windows 7?</p>
  
  <p>Update:
  I'm able to use this to shutdown: 
  mysqladmin -u root -p shutdown   </p>
  
  <p>Is there a correct way to start and shutdown mariadb?  I really don't want mariadb to be running automatically whenever I turn on my machine.</p>
  
  <p>Thanks.</p>