MySQL stuck inbetween states

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL stuck inbetween states

Postby Martin|FS » 28. October 2008 03:20

Hey, guys... Need your help here, I'm kinda new at this.

I can't start or stop MySQL. If I try "NET STOP MySQL" in cmd, it tells me that it can't be controlled in it's current state. I recently did <a href="http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html" target="_blank">this</a> to reset the root-pass that I messed up somehow. That's about the time when it stopped functioning properly.

I was briefly able to logon to PHPMyAdmin but I made no changes and then MySQL stopped. Can't control it from Windows' service manager either.

I'm running Windows Server 2003 and the latest version of XAMPP. No other installs of MySQL, Apache etc. Let me know if you need more information.

Thanks, I hope you guys can help out.

Martin
Martin|FS
 
Posts: 2
Joined: 28. October 2008 03:13

Postby Sharley » 28. October 2008 05:03

Martin wrote:I hope you guys can help out.

I hope we can too. :)

Did you try the related MySQL bat files?
.\xampp\mysql_start.bat or mysql_stop.bat

If MySQL is running as a service:
.\xampp\mysql\mysql_uninstallservice.bat

Alternate stop method if running as a service:
Go to start>Run..>type sc delete mysql>click OK

Check in Task Manager if all is clear.

BTW, HTML is disabled in these forums so best use BBCode for links. ;)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby Sharley » 28. October 2008 05:17

Here's a Tutorial I found in my KB that might help with your password woes - it was written in reply to a poster with a similar issue who was very new to all this and so it may be a bit long winded for those who know something of what they are doing:
Very Important!
Make sure that MySQL is stopped and the MySQL service is uninstalled if you have the service installed.

We will need to open 2 Command Console Windows in the xampp\mysql\bin directory and run some commands.

Just in case you are not familiar with how to do that please try and follow these instructions.

Open the first Console Window:
Click on start bottom left of the Windows Task Bar
Click on Run...
Type cmd.exe
Click OK
type cd C:\xampp\mysql\bin (change to your own path)
Press Enter

At the prompt bin> type mysqld --skip-grant-tables

The cursor should now be just flashing on a blank line waiting.

Leave that Console Window open and go to open the second Console Window.



Next, open the second Console Window:
Click on start on the Task Bar again
Click on Run...
Type cmd.exe
Click OK
type cd C:\xampp\mysql\bin (change to your own path)
Press Enter
At the prompt bin> type mysql -u root
Press Enter
At the prompt mysql>type all this:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Press Enter
At the prompt mysql>type FLUSH PRIVILEGES;
Press Enter
At the prompt mysql>type exit
Press Enter
You should be back at the bin>prompt and job done.

Now just close both Console Windows.

Your MySQL and phpMyAdmin will have user root with password password as set by this part of the above command:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';

If you want to change from password to a new one of your choice, just change password in between the single quotes to the new one of your choice for example:
UPDATE mysql.user SET Password=PASSWORD('mynewpass') WHERE User='root';

Now open the XAMPP Control Panel and you should see that MySQL is already started - just start Apache now, and to test that the password has indeed changed go to:
http://localhost/phpmyadmin

Enter Username: root and Password: password (or your new password of choice)

click Go

Alternatively, if you want to change the password using the XAMPP facility.

Go to http://localhost/security/xamppsecurity.php and use the facility there to change the root user password in the normal way - enter Current Password:password (or your new password of choice), then New password: and Repeat the new password.

Job done!
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby Martin|FS » 28. October 2008 22:33

Hey, thanks!

Just trying the mysql_stop.bat seemed to resolve whatever the issue. Simple :) - Not sure if the problem will occour again. Thanks for helping out. The password stuff is taken care of also.

Regards,

Martin

Sharley wrote:
Martin wrote:I hope you guys can help out.

I hope we can too. :)

Did you try the related MySQL bat files?
.\xampp\mysql_start.bat or mysql_stop.bat

If MySQL is running as a service:
.\xampp\mysql\mysql_uninstallservice.bat

Alternate stop method if running as a service:
Go to start>Run..>type sc delete mysql>click OK

Check in Task Manager if all is clear.

BTW, HTML is disabled in these forums so best use BBCode for links. ;)
Martin|FS
 
Posts: 2
Joined: 28. October 2008 03:13


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 195 guests