ducin
ducin

Reputation: 26487

how to create an automated mysql script in netbeans

Is there any way to automate executing MySQL script using NetBeans? I've got two .sql scripts that I can run from command line, but is there any way to integrate it in NetBeans to run it using a click, button or anything from GUI?

Upvotes: 0

Views: 1356

Answers (2)

John Hogan
John Hogan

Reputation: 1036

Choose File > Open File from the IDE's main menu. In the file browser navigate to the location where you previously saved .sql and click Open. The script automatically opens in the SQL Editor. Make sure your connection to (dataBase name) is selected from the Connection drop-down box in the toolbar at the top of the Editor. Connection drop-down box in the SQL Editor toolbar is located just above the editor in the tool bar.

Click the Run SQL (run SQL button) button in the SQL Editor's task bar. The script is executed against the selected database, and any feedback is generated in the Output window.

Upvotes: 0

MrSimpleMind
MrSimpleMind

Reputation: 8647

there is a RUN SQL button, in Netbeans. I dont know if that shows only when you are in the database explorer. I dont have netbeans installed now to test.

more to read on this guide: http://netbeans.org/kb/docs/ide/mysql.html#running

Upvotes: 1

Related Questions