Ubuntu Dbeaver backup database [closed] - ubuntu-16.04

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have Dbeaver installed and I have a connection to a PostgreSQL database on a remote server.
I'd like to export this database to my local PC but when I go to Tools -> Backup database I see an error
Client home is not specified for connection
What should I specify and where? I can't find anything about it in the documentation.

I use Windows 7, so maybe it doesn't work the same way, but it is worth a try.
First you have to install your local postgresql server. When this is done, it's quite simple, just make a rightclick on your PostgreSQL connection and then click on "Edit Connection". Here you can choose your local client.
I must say, I've search long enough for this on my own. Hope it helps.
And it is my first post, so sorry if I did something wrong.
Screenshot Server Connection:
Screenshot Edit Settings:

I found this solution using ubuntu linux:
look for pg_dump running this command as root
find / -name "pg_dump"
in my case, the relevant result is /usr/lib/postgresql/12/bin/pg_dump
Then, in "Connection Settings" as other answers here, click on "browse" and browse to /usr/lib/postgresql/12/bin/pg_dump or the location resulted on the previous step.

MAC specific answer
I ran into the same issue. Essentially, DBeaver needs to know where the postgresql bin is located. It contains things like pg_dump which the backup tool depends on. If you don't have PostgreSQL installed, then I'd recommend installing via: postgresapp.com
For version 11, as of this comment, the lib installation will be located here: /Applications/Postgres.app/contents/versions/11/bin.
Versions installed with brew are located in /usr/local/bin/postgres.
So within DBeaver you'll want to edit the DB connection properties to reflect the below screenshot. You'll be prompted to reconnect to your DB, but then you should be good to go.
Hope this helps.

Linux Specific Answer
Install PostgreSQL client locally
Open the terminal and type which pg_dump and it will return something like /usr/bin/pg_dump
In local client settings select browse and add the folder from the previous step. In my case it was /usr/bin/. Wait a few seconds it will detect the driver

Postgres SQL installed using Enterprise DB installer on Mac OS, pg_restore will be located in /Library/PostgreSQL/10/bin..
So select this location in DBeaver
It worked for me..

For Mac,
Right click on your connection -> "Edit Connection". (see image)
1
For local client, click browse (see below)
2
To see hidden file and folders, press "cmd + shift + ." Now you can browse to PG bin folder. Path will be added to local client.
After adding, select that path and you will see id, path, and name will be populated (see image)
3

In Ubuntu 20.04,Add Local Client value as '/user' (in Connection settings -->main)

Related

How to configurate the home client in dbeaver for Postgresql

I'm am tryng to import a database, however i'm getting this message :
Client home is not specified for connection
I guess that i have to configurate the cliente, however i dont't know how to fill these form, i've already tried, putting in the forms: /etc/postgresql/13/main, but does not work.
I was getting the error native client is not specified for connection when trying to export a database. In Terminal, ran the command which postgres resulting in /opt/homebrew/bin/postgres. Then in Dbeaver went to the database and right clicked > Edit Connection > Edit Driver Settings > choose the Native Client tab > Add Home > choose Mac HD > once that comes up hit Command + Shift + . to unhide the hidden folders. Then navigate to opt/homebrew/bin and click Open. It will find the postgres info it needs and add the home. Click OK > OK to close the pop-ups. Now I can do the export.
Actually the issue was the snap version of DBeaver. You can't access directories outside your snap home folder(in this case Dbeaver Snap home folder). So I reverted back to APT version of DBeaver using this link (for debain based version) and it worked like a charm.
So you just remove your snap version of DBeaver and install the official package from their website for your OS and you should be able to load the client without any issue.
I know its late.
Just install the pgsql from apt. you can follow this link to install.
Then setup client as: /usr/lib/postgresql/XX/ where XX is the version of the pgsql you installed.
There's a pretty lengthy discussion about this topic here:
https://github.com/dbeaver/dbeaver/issues/988
I couldn't manage to do it, because my dbeaver didnt have the right to get into /usr/bin and I couldn't open it in sudo from the terminal. I gave up and used psql instead.

Service 'MongoDB Server' (MongoDB) failed to start

I'm trying to install mongo DB on my local machine with the installer from the official website. But I'm continuously getting this message, can someone help?
I've tried the solution provided here but didn't help.
I suggest doing the following:
Hit Win+R to open up you run.exe then inside of it enter services.msc to open up services. Try locating the service under the name of MongoDB Server and set the Startup Type manually to Automatic - [In addition to that, you could set the username and password manually. If you get a message saying the user was granted login as a service right, try hitting retry on the MSI dialog and see if it starts].
Important:
Don't forget to save and close everything (services.msc) before continuing.
Also very important, you should (must) check your .NET framework version and update it to version 4.5 and above. You could download a software like eg Driver Booster to update all of your drivers and additional components that are outdated.
I ran into the same issue. My problem was the installation location. I was trying to install under C:\MongoDB. I resolved it by installing in the default MongoDb location which is C:\Program Files\MongoDB.
For me this is usually an issue with the configuration file %ProgramFiles%\MongoDB\Server\x.x\bin\mongod.cfg
At some time there was an invalid option "snmp" enabled (only valid in enterprise version).
Nowadays, although the installer asks for directories for data and logs it doesn't ALWAYS seem to use these, but defaults to %MONGO_DATA_PATH% or %MONGO_LOG_PATH%, respectively. I don't know where these should be defined, but the server fails at accessing c:\data\db (which doesn't exist). So you have to correct the paths.
I also faced this kind of error. But I just change the Network service to Local system in Log On As tab.
Follow my step-by-step below to resolve it:
Press Win+R, type: services.msc, then looking for MongoDB Server (MongoDB)
Double click on MongoDB Server (MongoDB).
Then it will open properties tab. On that tab click on Log On
After that check two items i.e. Local System account and Allow service to interact with desktop
After that press Apply and OK button. That's it, cheers!!
Open command prompt and copy the following command:-
"C:\Program Files\MongoDB\Server\4.2\bin\mongo.exe"
NOTE: This Tricks is work on my Windows 8.1 PC.
Comment out string with mp: in configuration file: %ProgramFiles%\MongoDB\Server\x.x\bin\mongod.cfg
Like this:
...
#snmp:
#mp:
Click Windows+r, type lusemgr.msc , Go to Groups and double click Administrators, Click Add, Click Advanced and click Find Now. Double click in Network Service (in bottom list) and click OK.
It worked for me.
Installing in the other locations other than the windows directory caused me this error. Reinstalling the setup with the recommended method of "complete" fixed it.
The problem occurs if you have Windows version previous to Windows 10.
Install the following update before installing MongoDB. Click on the link below.
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
It worked for me.
The problem occurs if you have Windows version previous to Windows 7. Install the following update by going to below link you have to download
Windows6.1-KB2999226-x64.msu
#You have to download and install then go to servies.msu and start MongoDB server by Start also go into log on and set to #local machine
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

Connect PostgreSQL to HammerDB

As the title says, I want to connect PostgreSQL (I'm using the 9.6 x86 version) to HammerDB, an open source database load testing and benchmarking tool (I'm interested in the TPC-C Benchmark).
The thing is that I can do this connection by using MS SQL Server (2014), because it is relatively easy. However, I'm not used to use PostgreSQL. When I try to create Virtual Users on HammerDB (that's the 1st step to do, then you should be able to perform the transactions) I get the following error:
Error in Virtual User 1: Failed to load Pgtcl - Postgres Library Error
I did some research about this, and I found that, and I quote "PostgreSQL is VERY particular about the libraries in its PATH - they have to be the right ones and ONLY the right ones any other configuration will cause errors".
The problem is that HammerDB couldn't load library libpgtcl.dll. There they mention that to fix the problem, one should check that the PostgreSQL bin directory has been added to the path during install, but at this point I'm totally lost and I don't know what to do. I simply can´t get what they mean and how to do it.
I hope at least one of you could help me. I would appreciate it a lot.
Sorry in advance for my mistakes in English, I'm a Spanish speaker.
Well, I have solved the problem, and it is very simple.
Everything is about Setting Windows PATH for PostgreSQL, and I found that here.
Open my Computer ==>
right click inside my computer and select properties ==>
Click on Advanced System Settings ==>
Environment Variables ==>
from the System Variables box select "PATH" ==>
Edit... ==>
Then add this at the end of whatever you find their
;C:\PostgreSQL\9.2\bin; C:\PostgreSQL\9.2\lib
after that continue to click OK
That's all. So this is what you should do if you are having trouble when trying to connect PostgreSQL to HammerDB, and in general, when trying to use PostgreSQL tools.

MySQL Workbench 6.3 (Mac) hangs on simple queries

I am using MySQL Workbench 6.3.7 build 1199 CE (64 bits) on a Mac with OS X Yosemite 10.10.5. I am connecting to an Amazon RDS MySQL instance.
When I enter a simple query such as
select * from `devices`;
and click the lightning-bolt-with-cursor icon, the query starts, indicated by the spinner activating next to the "SQL File 4" tab in the following screenshot. However, the query doesn't complete and it just hangs. The white-hand-in-red-stop-sign icon is disabled.
I can only force quit MySQL Workbench from this point on. If I try to do a regular quit, nothing happens.
How can I consistently run a simple query on my database? Sometimes it works (maybe 10% of the time), but it mostly just hangs.
UPDATE 3: The problem is fixed for MacOS HighSierra in MySQL Workbench 6.3.10.
UPDATE 2: It looks like the bug is recurring again in MacOS HighSierra. See https://bugs.mysql.com/bug.php?id=83658 for more details.
There is an unofficial build that fixes the problem. You can download it at: https://drive.google.com/drive/folders/0B2fTesDcrHzVRGVFWEdILWpuaEE?usp=sharing
The build was created by Bob Davenport. See https://bugs.mysql.com/bug.php?id=87714 for more details.
UPDATE: The bug is fixed in MySQL Workbench 6.3.9.
----------------------- original answer -----------------------
It is a known MySQL bug: http://bugs.mysql.com/bug.php?id=83658 caused by GateKeeper Path Randomisation introduced in MacOS Sierra. See https://weblog.rogueamoeba.com/2016/06/29/sierra-and-gatekeeper-path-randomization/.
A possible workaround is to remove the Quarantine ACL:
xattr -dr com.apple.quarantine "/Applications/MySQLWorkbench.app"
I found that if you use the latest 6.3 version, that in order to get queries to work, you have open a first connection and ignore it and then open a second connection. This creates two tabs in the workbench. If you perform your queries in the second tab, it works. If you try in the first tab, it hangs.
I also have found that you have to do a force quit the workbench.
I hope the mysql folks get this fixed.
To resolve this issue, I downgraded MySQL Workbench to 6.1. Now I am able to run my query and it doesn't hang.
In my case, it was changing the connection->ssl->Use SSL setting from "If available" to "No". Workbench 6.3.8 on OSX 10.12.1 now works for me.
The spinning wheel of death is due to the new feature introduced in the Sierra update called "Gatekeeper Path Randomization".
Follow the instructions:
Open MySQL Workbench :)
Right click on your connection (most likely “localhost” or “127.0.0.1”)
Choose “Edit connection”
On the right hand window select “Connection > SSL”
Change “Use SSL” from “If available” to “No”
Now click on the tab “System Profile”
Choose “MacOS X” as System Type
Click “Test connection”
Credits: http://cordobo.com/2398-mysql-workbench-6-3-macos-sierra-hangs-on-simple-queries/
The version 6.3.9 solved the problem, but this version is not showing in "Check for upgrades" option, you need to download directly from the site.
MySQL Workbench official download page
6.3.9 fixed the issue in the mac. Here is the link MySql 6.3.9
At last I have downloaded MySQL Workbench 6.3.10 and install MySQL Workbench 6.3.10 and solved my problem. I have downloaded MySQL Workbench 6.3.10 from bellow link https://dev.mysql.com/downloads/workbench/
It is working for me.. I think this will work for you..
I found that deleting the cache and workspaces folder contents (~/Library/Application Support/MySQL/Workbench) it works again. What I haven't found is how to ensure it doesn't hang again :-(
I also found that if I manually close the Connection tab from the menu and exit WB from the menu and not from the OS window buttons it seems more stable next time.
PS: I am using SSH connection so it may be due to this but it is not always happening.
UPDATE: A clean install and no SSH configurations the issue still persists. Unless you manually go and delete the cache folder files it continues to hang.
I was getting around the problem for awhile by deleting the user library folder and dropping back to version 6.2.5 ... but today found the problem was back. So today I deleted the user library folder and dropped back to version 6.1.7. It's working again, for now.
In my case, the IP address changed where mySQL was served.
Flushing the DNS fixed it for me:
sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder;
say cache flushed
This seemed to help some of the time, but not 100%:
Connect to the database with a different user, and then re-connect with the original user.
I'm about to downgrade like the accepted answer says though, as this doesn't solve it every time.
This is still an open bug in 6.3.8:
https://bugs.mysql.com/bug.php?id=82231
The possible workaround is to open secondary tab with the same connection and work in there. However it crashes anyway from time to time.
Until the bug is fixed I use free Mysql Workbench aleternative for common work. For mac users I would suggest https://sequelpro.com.
Upgrade to 6.3.9 fixed the issue. The 6.3.4 was hanging on queries for me. Unfortunately the Help > Check for Updates didn't indicate any updates were available, so I went to the source.
This can probably help as a temporary/immediate solution. If I try to manually type the below query, MySQL Workbench hangs, especially at x.*
SELECT
x.*
FROM x_table x;
But if I write the SQL in another editor and paste it in MySQL Workbench and run the query, it doesn't hang.
Versions: MacOS Big Sur (11.2), MySQL Workbench 8.0

Error " Specified location is not a valid domain" [duplicate]

This question already has answers here:
eclipse error: glassfish\domains\domain1 does not exist
(8 answers)
Closed 6 years ago.
I'm trying to add a Glassfish 4.0 server to an eclipse Spring Tool Suite project (3.6.2).
-Glassfish 4.0 server is running and working (I can see on the localhost console)
-Glassfish for 4.0 are installed in my sts
I have no problem with the first and second panel (server path location), but with the third, I get an error " Specified location is not a valid domain". I don't understand this error, because this is the good location and the good name for my domain (I could verify it with the server log). I've tested with the browse panel and that didn't work too.
So, I'm don't why I get this error.
Thanks
Ps: Sorry I can't post pic
Look at your install directory, find file like this:
C:\tools\glassfish4\glassfish\bin\asadmin.bat
run asadmin.bat, enter command:
create-domain --help
to see document.
create-domain your_domain_name
to create new your_domain_name domain.
Check list domains, use asadmin enter command:
list-domains
Reference: GlassFish Server Documentation. You should also check your GlassFish Tools for Luna inside Spring Tools suite.
You must to add a password to your admin user. Eclipse mistake. Eclipse doesn't recognise the domain without admin password
When you create the domain, add a admin user and a password and Eclipse doesn't complain any more