how to open multiple model/database in mysql workbench

戏子无情 提交于 2019-12-21 07:13:13

问题


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?


回答1:


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):




回答2:


As Mike Lischke said.

You can allow multiply instances of MySQL Workbench

Edit -> Preferences -> General (tab) -> Others (section) -> check box




回答3:


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



回答4:


You can launch multiple instances of WorkBench using the Terminal Application. Open Workbench as normal, then open Terminal.app. Run "ps ax | grep -i workbench", you should see a result like this: "11260 ?? U 2:34.86 /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench -psn_0_1823165". Copy this part, and paste it into Terminal, /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench and hit enter. That will create another instance. Open a new terminal tab, and do that as many times as you wish.




回答5:


On linux I can open two msql workbench instances. The second instance can be opened by running the executable file directly.

Find where the executable file is located by running

ps -ef | grep workbench
20084  1989  0 May09 ?        00:00:00 /bin/bash /usr/bin/mysql-workbench
20123 20084  0 May09 ?        00:00:00 /bin/sh /usr/bin/catchsegv /usr/bin/mysql-workbench-bin
20125 20123  0 May09 ?        00:13:25 /usr/bin/mysql-workbench-bin
26810  1499  0 11:00 pts/18   00:00:00 grep --color=auto workbench

Then run the executable file as a root user

sudo /usr/bin/mysql-workbench 


来源:https://stackoverflow.com/questions/21235894/how-to-open-multiple-model-database-in-mysql-workbench

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!