This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Install NetBeans with bundled MySQL. 2. Rightclick MySQL server node and choose "Start". Server is started. 3. Rightclick MySQL server node and choose "Stop". Result: Message "ERROR 1049 (42000): Unknown database 'stop'" appears in the output and MySQL isn't stopped.
Hi, Roman. Can you stop the server from the command line? If so, what command and arguments do you use? Does this match what you have configured in the properties dialog for the MySQL node?
I don't use any command. I just kill process. :)
It seems pretty clear to me the problem is that the stop command is incorrectly configured in NB. See if you can use the command line to stop the server, using the same command that you is configured in the MySQL properties dialog. If you can't, find out what you can do to correctly issue the stop command, and then reconfigure MySQL in NB to use that command and arguments.
In MySQL 5.1.26rc following works for me: mysqladmin.exe -u root shutdown Probably this issue should be reassigned to installer guys, because installer set default parameters for bundled MySQL. Add to CC Dmitriy (dlipin).
Unless they're doing some magic I'm aware of, I don't know how the installer team can set the default parameters for start and stop, as this is done in my code and they have no access to it. Please check the parameters set in the admin properties panel -- what are they set to in terms of command path and arguments? Where is MySQL getting installed with the bundle? I had wanted to work with dlipin and the installer team on fixing the MySQL bundle for the next release so that the correct parameters get set, but it doesn't look like that's happening.
MySQL is installed by default to C:\Program Files\MySQL\MySQL Server 5.0. Of course it is possible to set different path. Command to start: C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe Parameter to start: no Command to stop: C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld.exe Parameter to stop: -u root stop
I think that's the correct solution for now. I try to guess at the correct path, but if it's wrong, all you have to do is change it. Once we fix the bundle to set the system properties, then this shouldn't be an issue for bundled MySQL.
First of all I did mistake: Command to stop: C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe (was mysqld.exe) And I wrote about parameters, which are set now by installer (or something else, I don't know). You said that parameters are set from your code. So I think we have to fix this issue, since "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe -u root stop" doesn't work at all, this command gives message "Database 'stop' doesn't exist" (or something like that). So this command is wrong. And moreover, if we have bundled MySQL server, then we definitely know installation path, there is no need to guess, right? And I don't think that it is a good idea to let customer change paths and parameters, when MySQL installed with NetBeans.
Roman, David, I guess the right commands to stop the server (on windows) is: mysqladmin.exe -u root stop. Roman has already mentined it for 5.1.26rc (comment from Wed Jul 30 09:58:15 +0000 2008) - it also works for 5.0.51. If the password has been set (e.g. 12345678), then the command should be different: mysqladmin.exe -u root --password=12345678 shutdown or mysqladmin.exe -u root -p shutdown In the latter case the user has to input the password using stdin. In the MySQL bundle we install mysql as the service (with name MySQL50) so it`s easier to start and stop it using the system facilities: net start MySQL50 net stop MySQL50 The advantage of those command that they do not require a password, they are simple and gives the self-explanatory output. The disadvantage is that they can`t be used always : if the user installed MySQL using standalone installer and configured MySQL not to start as the windows service (or configured to use some custom service name - default is MySQL in the standalone installer) then those command can`t be used out-of-box...
OK, it sounds like I am deriving the wrong stop command for a standard installation of MySQL on Windows, so we should fix that. Regarding your comment that if it's bundled, we should know where it's installed and how to start and stop it, I totally agree, and that is what Dmitry and I are working on as a separate issue. So let's keep this issue about the fact that I am configuring the stop command wrong for a standard XP installation.
I don't believe this is a P2. The workaround is quite simple: fix the command arguments in the admin properties panel for the MySQL node. Please re-raise priority if this workaround doesn't work for some reason.
OK, if the password has been assigned then there's not much I can do, but I can do by default "mysqladmin.exe -u root stop". If the password is required then there will be an error and the user can change the command to include "-p password".
David, I wrote that for me "mysqladmin.exe -u root shutdown" works, not "mysqladmin.exe -u root -p stop".
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/7887d1b4d07c User: David Van Couvering <davidvc@netbeans.org> Log: #142094: MySQL server can't be stopped
Hi, Roman, please verify that this works correctly now with the default installation on Windows.
Where I can get latest bundled build?
Verified with build 080910.