Follow these 2 steps:
STEP 1 :
Follow these steps using the Services Tab:
- Right click on Database
- Create new Connection
Customize the New COnnection as follows:
- Connector Name: MYSQL (Connector/J Driver)
- Host:
localhost
- Port:
3306
- Database:
mysql
( mysql is the default or enter your database name) - Username: enter your database username
- Password: enter your database password
- JDBC URL:
jdbc:mysql://localhost:3306/mysql
- CLick Finish button
NB: DELETE the ?zeroDateTimeBehaviour=convertToNull
part in the URL.
Instead of mysql
in the URL, you should see your database name)
STEP 2 :
- Right click on
MySQL Server at localhost:3306:[username](...)
- Select Properties… from the shortcut menu
In the “MySQL Server Properties” dialog select the “Admin Properties” tab
Enter the following in the textboxes specified:
For Linux users :
- Path to start command:
/usr/bin/mysql
- Arguments:
/etc/init.d/mysql start
- Path to Stop command:
/usr/bin/mysql
- Arguments:
/etc/init.d/mysql stop
For MS Windows users :
NOTE: Optional:
In the Path/URL to admin tool field, type or browse to the location of your MySQL Administration application such as the MySQL Admin Tool, PhpMyAdmin, or other web-based administration tools.
Note: mysqladmin is the MySQL admin tool found in the bin folder of the MySQL installation directory. It is a command-line tool and not ideal for use with the IDE.
Citations:
https://netbeans.org/kb/docs/ide/mysql.html?print=yes
http://javawebaction.blogspot.com/2013/04/how-to-register-mysql-database-server.html
We will use MySQL Workbench in this example. Please use the path of your installation if you have MySQL workbench and the path to MySQL.
- Path/URL to admin tool:
C:\Program Files\MySQL\MySQL Workbench CE 5.2.47\MySQLWorkbench.exe
- Arguments: (Leave blank)
- Path to start command:
C:\mysql\bin\mysqld
(ORC:\mysql\bin\mysqld.exe
) - Arguments: (Leave blank)
- Path to Stop command:
C:\mysql\bin\mysqladmin
(ORC:\mysql\bin\mysqladmin.exe
) - Arguments:
-u root shutdown
(Try-u root stop
)
Possible exampes of MySQL bin folder locations for Windows Users:
C:\mysql\bin
C:\Program Files\MySQL\MySQL Server 5.1\bin\
- Installation Folder:
~\xampp\mysql\bin