T0MSSM0T
T0MSSM0T

Reputation: 21

Windows start mySQL server from command line

I have looked for an easy way to start a mysql from the command line.

I know about

" shell> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" The path to mysqld may vary depending on the install location of MySQL on your system. "

But I want something more like linux where you can type "sudo service mysql stop/start/status"

I have the mysql path setup so I can run mysql commands like "mysql -u root -p"

I am not sure if it is possible either. I want to know if anyone has a way to do this.

Upvotes: 1

Views: 6110

Answers (1)

T0MSSM0T
T0MSSM0T

Reputation: 21

Using the help from the comments I have solved my issue, for anyone else.

  1. When I installed mysql it gave me the option to name the service for the server

Mine is called "MySQL57" (this meant mine was already a service. If your's isn't I would follow this: Mysql service is missing although I can't guarantee it worked)

If you aren't sure you can open services with: windows key + R then type in "services.msc"

  1. You can start and stop windows services with "net start/stop service-name" For CMD I need to run as admin then type "net start mysql57"

Upvotes: 1

Related Questions