Wednesday 11 January 2017

Use of MYSQL Workbench



Hi friends,
Hope you all are enjoying your work.

Today i am going to show you how to use of mysql workbnch .


before doing this i am sure that you have already installed following things on your machine:

1. MYSQL.
2. MYSQL Workbench.



So now lets do this step by step.

Step 0.  Open your work bench by double clicking on your installed workbench icon.Its look like this :



Now you will have to click on + button nearby on your MYSQL Connections (+).
Then you will have to fill necessary things.


Step 1.  Now click on following place which is in red circle in below image to connect your local MYSQL database.







Step 2. After clicking on Local Instance 3306 you can see this like in below image:



Now you should enter your MYSQL password to connect your local database.


Step 3.  After entering password of MYSQL database , you will see this window :

In the above window , i had opened some sql file before, don't worry about that if the same is not opened on your machine.



Step 4. Now you will have to choose .sql file which you want to import in your database. So select the .sql file after clicking on below icon of this window.



Step 5.  After clicking on this icon you will have to choose file location where you are having your .sql file.

choose .sql file which you want to import on your database. ( Please double click on .sql file accordingly ). see in image :






Step 6. After selecting you desire .sql file you will see that , the window is opened with a tab having respective file name like that :




In the red area ( in  tab window ) you can see that there is many sql command written in that particular .sql file. Which is going to execute in next step.
Make sure that don't alter these sql commands.


Step 7. Now will have to execute these all sql commands which is in red area in above image.

To do this you will to click on this red area ( icon on the red area ) in below image . Click that particular icon in your workbench window:




Step 8. After clicking above icon your sql file will be executing. But it will take very little time to execute your all sql commands.


Ok fine, Your sql file has been executed. Now you can check the results and errors from following :
look just below on your main screen.



In the red area on above image all the sql log is recorded, you can open it by dragging up of action output area. The black arrow shows that it can be dragged up and down to show all errors or results.


Now you can execute all your .sql file one by one as described. You can execute many .sql file once, but doing one file one time is more better and safe.
So i suggest to do one by one.




Step 9. Check your database tables and Stored Procedures in your database. ( Do this after executing your all sql file ).

click on this icon which is in red area on below image:





Step 10:  If you are not able to see all database once then you can increase you view area by dragging this icon which is in red area on below image.







Check your tables in your particular database has been imported or not.
Be sure that all your Stored procedures has been imported or not.
You all database and tables is showing in red area. Also your stored procedures showing on red area in below images.:






If all your tables and stored procedures are showing then it successfully imported otherwise there may some error occurred when you imported or may be some wrong sql queries in .sql file.



 Please feel free to like , share links and comments for any query and support.


All The Best Friends..
Have a good time.