Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open multiple model/database in mysql workbench

I have two model

1) Server Model : conneted to remote database which is stored on server  2) Local Host :  connected to my pc database is stored in on pc. 

I want to query to both database tables simultaneously. Each time i have to switch between database model.

How to do it?

like image 965
Developer Desk Avatar asked Jan 20 '14 13:01

Developer Desk


People also ask

Can you have multiple databases in MySQL?

You can set up multiple instances of mysql but for your situation you are better off creating different databases within the same instance. You can create databases and then add users that only have access to manipulate the database they are given and nothing else.

How do I view my database in MySQL Workbench?

To view the database created on MySQL Workbench, navigate to Database > Connect to Database . Choose an existing connection to connect to MySQL Server or create a new one. The database created will be as shown in the screenshot below.

How do I see all schemas in MySQL Workbench?

To open Schema Inspector click (i) icon that shows up on hover over schema name: or right click schema and select Schema Inspector. When Schema Inspector opens go to Columns tab. All columns are visible in a grid.


2 Answers

That's a traditional limitation of MySQL Workbench. You cannot open 2 models at the same time in a single instance of MySQL Workbench. On some platforms (like Windows) you can however open multiple instances (just be careful when changing settings, connections etc. as they are shared among all instances, last save wins).

On Windows you may have to enable multiple instances first by changing the setting under Edit > Preferences > Others (tab):

enter image description here

like image 111
Mike Lischke Avatar answered Sep 27 '22 21:09

Mike Lischke


To launch multiple instances of WorkBench thru the Mac Terminal

Mac Version: OS X El Capitan Version 10.11.6

Workbench Version: Version 6.2.5.0. Build 397 (32bit) ###

On Your Mac;

  1. Open MySQLWorkbench
  2. Open Terminal
  3. run ps ax | grep -i workbench (as stated above by Derek)
    • Remember the location part of the output:
      • ie: /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
  4. Lastly, run this to open new Instances on your mac

open -Fna /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench

  • Please modify the path to your mysql from step 3.

Further Explanation: (from the man pages for open)

  1. -F Opens the application "fresh," that is, without restoring windows. Saved persistent state is lost, except for Untitled documents.
  2. -n Open a new instance of the application(s) even if one is already running.
  3. -a application Specifies the application to use for opening the file
like image 37
JayRizzo Avatar answered Sep 27 '22 21:09

JayRizzo