0

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?

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

yep, there it is, I can do exactly what I wanted. For each opened SQL file there is a combo select for a db connection (previously defined in NB/services/databases) and run SQL icon (in the editor window)
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.