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.

Bug 174402 - IDE unable to start MySQL database server
Summary: IDE unable to start MySQL database server
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: MySQL (show other bugs)
Version: 6.x
Hardware: All Mac OS X
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 23:19 UTC by Troy Giunipero
Modified: 2009-10-13 15:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Giunipero 2009-10-12 23:19:51 UTC
Unable to use Start action provided by the IDE (Choose Start from the MySQL Server right-click menu in Services window).

My 'Path to start command' in Admin Properties is:  /usr/local/mysql/bin/mysqld  (which is the default location for Mac
OS X).

The output received when running the command is as follows:

091012 23:58:53 [Warning] Setting lower_case_table_names=2 because file system for
/usr/local/mysql-5.1.37-osx10.5-x86_64/data/ is case insensitive
091012 23:58:53 [Note] Plugin 'FEDERATED' is disabled.
 /usr/local/mysql/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
091012 23:58:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
091012 23:58:53  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

It is possible that the problem is on my side, and that there is something the matter with my permissions
configurations. However, I've /never/ been able to use this command, since the MySQL integration in version 6.1. 

Furthermore, it seems that David Van Couvering himself, who was working on the implementation, needed to create a
script, which he used for the 'Path to start command' so that it could be run with admin/root priviledges (See:
http://davidvancouvering.blogspot.com/2008/09/starting-mysql-in-netbeans-as.html).

If there is an obvious solution (i.e., path and arguments to insert into the MySQL Server Properties dialog), please
inform and close the issue.
Comment 1 Jiri Rechtacek 2009-10-13 07:57:29 UTC
I'm looking where might be a problem...
Comment 2 Jiri Rechtacek 2009-10-13 15:14:12 UTC
Troy, you are right. It's the only way how to solve registration mysql in recent NetBeans because you don't know the
mysql's root password. The mysql's root account is not the MacOS system's root account. For that reason you have to
start mysql by mysql_safe. But this command can be ran by sudo permission only. David's script from his blog allows
invoke GUI sudo command from netbeans IDE. So, make a 'macsu' script like David:
--------------------------------
#!/bin/sh
/usr/bin/osascript -e "do shell script \"$@\" with administrator privileges"
-------------------------------
and make it executable. Then fill Admin properties in MySQL Node to
Path to start: /Users/<your_account_name>/macsu
Arguments to start: /usr/local/mysql/bin/mysqld_safe
Path to stop: /Users/<your_account_name>/macsu
Arguments to stop: /usr/local/mysql/bin/mysqladmin -u root shutdown

In the end, leave root's password empty.
It worked for me in NB6.8M2 build.