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?
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):
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;
Open MySQLWorkbench
Open Terminal
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
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)
-F Opens the application "fresh," that is, without restoring windows. Saved persistent state is lost, except for Untitled documents.
-n Open a new instance of the application(s) even if one is already running.
-a application
Specifies the application to use for opening the file
As Mike Lischke said.
You can allow multiply instances of MySQL Workbench
Edit -> Preferences -> General (tab) -> Others (section) -> check box
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.
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
Related
On my Mac PC, I have installed MySQL and SQL Developer as well as the MySQL Connector/J, the official JDBC driver for MySQL, so that the MySQL tab appears in the connection window of SQL Developer.
In the SQL Developer connection window, I am filling in the following details
Connection name: test
Username : root
Password: xxxxx
In the MySql tab within this connection window, the hostname and port is auto populates the values localhost and 3306.
There is a button called 'Choose Database', when I click on this button I am getting the below error message in red color
"Status : Failure - The server time zone value 'AEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support"
How do I fix this issue so that I can connect to the MySql database from SQL developer?
PS: I am currently based in Sydney, Australia.
The problem got resolved by adding the below entries in the below mentioned file. In the new mysql database installations, this file would not be present so create the file so you will have create new plain text file with root privileges. When you start the MySQL server, this file will be read every time. The value specified below is a global parameter.
/etc/my.cnf
[mysqld]
default-time-zone='+10:00'
The single quotes should typed in not copy pasted.
And then restart the MySQL server.
Upvote to Nitin Puthran's answer.
If you have a Homebrew installation of mysql, my.cnf is in the Cellar mySql directory (not etc). For my version this is:
/usr/local/Cellar/mysql#5.6/5.6.41/my.cnf
[mysqld]
default-time-zone='+10:00'
And restart the mySql server.
I installed MySQL 8 with native packages on Mojave (10.14.6). As far as I can tell, there is no such thing as a my.cnf file. I couldn't get MySQL to recognize any my.cnf file, even by specifying one on the configuration tab of the MySQL settings applet in System Preferences. The only thing that worked for me was editing /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist and adding <string>--default-time-zone=America/Denver</string> to the Program Arguments section. Either restart your Mac or use the aforementioned applet to restart the server.
I imagine using a city name will only work if you have loaded timezone data into MySQL. mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql worked for me. Otherwise an offset like the above answers should work.
I am new to servers and currently I am stuck in a problem. I want to transfer a while from one server to another. I am using ubuntu through a putty. Both the servers have a private key. So can someone help me out with this?
Thank you
Putty is windows client. You can use your Windows box and to transfer file/s in two steps: 1. server1 -> your pc and 2. your pc -> server 2.
You can do this with putty (here is a howto) or by using WinSCP (download link)
Your steps should be:
Copy ssh key from Windows machine to source Linux machine.
Configure Windows Putty client to use ssh key upon connections to source Linux machine.
Connect to to source machine.
Run scp command to transfer file to destination Linux machine.
Steps detalization:
It could be done using WinSCP client. This link will help you:https://www.siteground.com/tutorials/ssh/ssh_winscp.htm
Your configuration screen could look like:
It's clear.
Run
scp -i ssh_key_file_with_path source_file_name_with_path username#destination_host:destination_folder
More about scp command http://www.tecmint.com/scp-commands-examples/
Example:
You want to transfer /home/superuser/script.py to 10.62.96.12 server into /var/www folder. You command could look like:
scp -i ~/some_ssh_keys/id_rsa /home/superuser/script.py root#10.62.96.12:/var/www
P.S. Make sure your user have enough rights to access source file and destination folder.
This is works in ubuntu
==> scp "file" "username"#"IP address or hostname":"Destination"
Or just download WinScp and transfer the file to your local m/c and then to the other server.
Try this it will work :
Step 1 :
Login to the server(from where you want to transfer the file to another server) using putty.
Step 2:
Once successfully login to the server then this linux command you have to use :
scp filename (another ubuntu server IP)XX.XXX.XX.XX:/path/
Here,
filename = File name you have to transfer to another server.
XX.XXX.XX.XX = Ubuntu Server IP on which you transfer the file.
path = Specify the Path where you want to transfer the file.
then, you see the message on your terminal :
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '(another ubuntu server IP)XX.XXX.XX.XX' (ECDSA) to the list of known hosts.
My MySQL Workbench is not connecting to my local host, and I cannot figure out why exactly it is reacting like this. It just started doing this one day, and randomly it will give me access although it says it is still "unknown", but I am tired of this and would like to fix it.
Since this website reqires that I have a "10" reputation to post images, I will have to describe it.
On the Startup/Shutdown tab in the administration page, it says:
The database server instance is unknown. --The "Start Server" button is faded out so that I cannot click it.
Startup Message Log
2013-07-11 08:57:51 - Workbench will use cmd shell commands to start/stop this instance
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:02:01 - Status check of service 'MySQL' returned error: Not found
Then on the server status tab in the administration page, it says:
Name: mysqld#localhost
host: localhost
server:unknown
status: unknown
Connection
There is no connection to the MySQL server. This functionality requires an established connection to a running MySQL server to work.
If anyone can help out, that would be great!
Thanks
I had this problem on my Windows 8.1 machine and it turned out to be problems with the file permissions.
To repair it I went into the folder at "C:\Program Files\MySQL\MySQL Server 5.6" and right clicked on the "data" folder and selected properties. Clicked the security tab and clicked edit. From there click the ADD button then the ADVANCED button and finally the FIND NOW button. In mine I added users, administrators, and "ALL APPLICATION PACKAGES". I granted full control to the users that were already listed for the data folder and the users, administrators, and ALL APPLICATION PACKAGES.
After the permissions were repaired I opened a command prompt as administrator and changed to the "C:\Program Files\MySQL\MySQL Server 5.6\bin" directory cd "C:\Program Files\MySQL\MySQL Server 5.6\bin". From there you can execute mysqld --install which installs the MySQL service.
More information about installing the mysql service on windows can be found at http://dev.mysql.com/doc/refman/5.0/en/windows-start-service.html
[edit] Please note that if you are using a different version of MySQL than the path to the MySQL data directory and bin directory may be different on your windows machine.
The error message says it: the service with the name MySQL cannot be found. So probably your MySQL service has a different name? Do you have a service at all? Starting mysql manually from the bin folder is just that: manual. There is no service involved, hence WB cannot manipulate the run state.
When you install MySQL with the MySQL installer you have everything in place within a couple minutes and it works right from the start.
So first check if you have a service running for your MySQL server and stop starting it manually. If there's a service take its name and enter it in the Windows Service Name field of the configuration manager:
Note that MySQL Workbench can manage your server only if it is installed as a Windows service.
I had this problem on my Windows 8.1, and I solved it updating my workbench to Version6 with "mysql-installer-web-community-5.6.16.0.msi" from the official page of mysql
I have found reinstalling all MySQL products a better alternative, because some of the solutions on the internet will make another instance of your mysql server along with mysql56, which might mess things up for a beginner.
Remember to keep database files and configuration undeleted during the reinstallation.
I had problem on MAC.
Please ensure you have installed mysql and its running. Because installing only workbench app, will not install mysql service. First install mysql and run the service.
In my case, I tried with brew
brew install mysql // installing mysql
brew services restart mysql // restart service after installing
mysql --version // check version
I recently installed mysql5.5 to my Windows 7 (x64) machine. The first problem was I couldn't enter the cmd client with mysql -u root -pmypass. The cmd opens, yields an error for like 0.5s and closes. Than I created another user account with all privileges, it worked and I created a database. But now I want to export that database from MySQL Workbench but I cannot see that in the "select a schema" option. I tried "new connection" and "new server instance" none worked.
Any suggestions?
Thanks in advance..
For the command line use WB too. In the list of connections you can right click for the context menu, which also offers to open a CLI window. In general, when you work with the CLI first open a normal CLI window (Start Menu -> Programs -> Accessories) and then try the mysql -u -p command. This way the CLI window won't close immediately and you can see what error message came out.
For WB: if you don't see a schema you know is there then probably the user you used to connect has no permissions to see it. So for tests try connecting as root and see if your schema is there. Import and Export of db objects (including entire schemas) is available in the admin section, not in the SQL IDE (where you found "Edit Table Data" etc.).
I was trying to reinstall MySQLServer on my local machine (Win7 32), using Windows (x86, 32-bit), MSI Installer.
When wizard configure server, after installation, gives the error "Configuration failed", with details:
mysql-server-5.5-win32:6 - Looking for valid template
mysql-server-5.5-win32:13 - Found valid template.
mysql-server-5.5-win32:20 - Attempting to process template.
mysql-server-5.5-win32:26 - Processed template.
mysql-server-5.5-win32:33 - Attempting to configure service.
mysql-server-5.5-win32:40 - Configured service.
mysql-server-5.5-win32:46 - Attempting to start service.
mysql-server-5.5-win32:100 - Unable to configure service.
mysql-server-5.5-win32:100 - Product configuration controller finished configuration.
Why does it happen?
Can it result from using a wrong "old" password that I put in the installation wizard, to set a new password? If yes - How can I clean up ALL previous settings of MySQL server?
Uninstall MySql and all his components excepted Oracle installer, re launch installer, do normally, when your error comes, finish the procedure of installation.
Next step, in start menu search "services", execute services administration tool, right click on the service "MySql Server XX", select "Connexion" tab and check "system account" on start user, launch the process and it would work.
I was struggling with upper problem over 3 days and I think there is a bug when you want to install this with local connection (not tick TCP connection) via .msi installer. After i selected this the configuration passed properly with no fail configuration. My sollution was to run this with set tick on TCP connection and then in server folder in my.ini file just uncomment line # skip-networking .
Other tips:
Turn off the firewall or add rule for installer to accept public/private net connections.
Under admin privileages use netstat -ab | more command to check ports usage
If u fail with earlier installations run services.msc command find your service (installer set is as defauls something like MySQL56,MySQL56_1 - depending on version) get the name of this service and under admin privileage run cmd and type sc stop "coppiedServiceName" if the service is running and later sc delete "coppiedServiceName"
In some forum says that if might be usefull to turn of windows defender or antivirus too
If you change default installation directory after reinstall check for old install files on C:\Program Files C:\ProgramData and get rid of them
Hope somebody find this usefull.
I had the same issue on Windows XP. The problem was caused by the localization. I had to change the path to the All User's AppData folder using regedit. The original path contained a non ANSI character.
The registry key is this:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
The value name is this:"Common AppData"
The original value was: "%ALLUSERSPROFILE%\Data aplikací"
I changed it to: "%ALLUSERSPROFILE%\AppData"
Then the installer succeeded.
NOTE: Uninstall MySQL first, then change the path, then install MySQL again.