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. Start IDE. 2. Add MySQL server and start it. Process is running. 3. Close IDE and then reopen it. 4. Rightclick MySQL server node and choose "Start". Result: Another MySQL process is running. After some time of work there will be lack of memory.
Please provide more information about your environment. You shouldn't be able to start multiple MySQL processes, because the second and following ones will fail after detecting the network connection is already in use by the first one. The only thing I can think of is that the process NetBeans starts to start the MySQL process never exits, so if you keep on clicking "Start" we keep on creating new processes. Why on earth would a user do this? Why do you believe this is a P2?
Product Version: NetBeans IDE Dev (Build 080802) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) I always can reproduce this issue. Draw attention to point 3). You should restart IDE. I think that it is P2 since it can be the reason of lack of memory. Since IDE after long work starts often to be slow, then user may want to restart it and start MySQL again. And user won't see that there are many MySQL processes. This is also performance issue.
Sorry, I still don't get it. Why would someone try to restart the MySQL process each time they start the IDE? What do you mean by "another MySQL process?" What platform are you running on? How do you determine that another process is running? Can you show me for example the output of 'ps' or a screen shot of the Windows task manager? David
Why would someone try to restart the MySQL process each time they start the IDE? Nobody try. Just restart IDE and MySQL is still looks like stopped. Then user rightclick MySQL server node and choose "Start". At least for me, second mysqld.exe process is running. What do you mean by "another MySQL process"? How do you determine that another process is running? Can you show me for example the output of 'ps' or a screen shot of the Windows task manager? I mean another mysqld.exe process. I see it in Windows task manager. See screenshot in attach. What platform are you running on? Windows XP.
Created attachment 66584 [details] Screenshot of "Windows Task Manager" with 2 mysqld.exe processes.
Taking over.
It seems this happen when the InnoDB engine is enabled. The second mysqld process keeps trying to lock the InnoDB files, which it can't because the first process has locked them. The second process also displays a warning message pointing to the likely cause (that another MySQL instance is running), but not on the console unless started with the "--console" argument. When InnoDB is not enabled the second process aborts because it can't listed on port 3306. Still evaluating the fix, but my ideas are along the lines of adding "--console" as a default argument to mysqld. This would cause the error message to be displayed in the MySQL output window, informing the user that there is a problem.
d8c9590b5377
Do the same for MySQL 5.1 since your change affects only MySQL 5.0 and I still can create more than one MySQL process for MySQL 5.1
Fixed
The change should affect both MySQL 5.0 and 5.1. Yes, the second process is always created, just as if you had started it manuallyl using mysqld. The change just displays the MySQL log in the MySQL Output window, informing the user that there is a problem (another MySQL instance is running, or the server could not start, depending on whether the InnoDB engine is enabled -- cf. desc8).
Created attachment 67243 [details] Screenshot of "Windows Task Manager" with 2 mysqld.exe processes and no message in Output window.
I don't see any message. The problem can be that 5.0 has for Windows mysqld-nt.exe process, but MySQL 5.1 just mysqld.exe.
Please attach a screenshot of the "Admin Properties" tab of the MySQL Server Properties dialog.
Integrated into 'main-golden', available in build *200808141419* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/d8c9590b5377 User: Andrei Badea <abadea@netbeans.org> Log: #142622: NetBeans creates too many MySQL processes
Created attachment 67432 [details] Screenshot of "Admin Properties" tab.
Note that MySQL 5.1 doesn't have mysqld-nt.exe file and admin properties were set by me, since it isn't bundled MySQL, but standalone.
The "--console" parameter to mysqld is not present. It should have been added when the server was detected. But perhaps the server was detected by an old build, which did not add the "--console" parameter. Please remove your userdir and try again. Is there a "--console" parameter? Thanks.
> admin properties were set by me, since it isn't bundled MySQL, but standalone. But did NetBeans detect the server, or not? If it didn't, and you just registered the server manually, then I'm sorry, but there is nothing I can do to help. It is just as starting mysqld multiple times -- an user error.
With "--console" parameters everything looks better. But MySQL wasn't detected automatically. And starting mysqld multiple times isn't an user error. The user don't know that MySQL has been started and NetBeans also doesn't reflect this. If that's all we can do, then this issue is fixed.
> The user don't know that MySQL has been started I think most users do know the state of their server, so the impact of the issue is not so big after all. > If that's all we can do, then this issue is fixed. Closing then.
Verified with build 080819.