To my fellow gearheads out there I need a script to start and stop mysql in Windows 7.
In Windows XP Pro 'net stop mysql' and 'net start mysql' worked nicely.
But you have to run it as an administrator in Windows 7.
'Net stop mysqladmin' and 'net start mysqladmin' don't seem to work.
I am looking to setup a bat file to automate stopping and starting mysql in Windows 7 for restoring to my home computer.
Any help would be appreciated.
Thanks,
drtmz
Script to start / stop mysql in Windows 7
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Script to start / stop mysql in Windows 7
I can't think of a way to get around running it as admin. But that's not so bad. I personally handle it with shortcuts to the bat, setting the properties on the shortcut to always run as admin. I also suspect that you can specify a Windows user as part of the net start... command. At least you can do things like that from in C#, so I assume there's support for that in the bat command interpreter. The mysql website or forum might also have some suggestions.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com