How to configurate the home client in dbeaver for Postgresql - 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.

Related

MongoDB - mongodb setup wizard ended prematurely

I'm not able to install MongoDB(4.2.6). I've downloaded the "MSI" version but even though I'm getting this error message displayed. I have tried unchecking the MongoDB compass option, rebooting the system and installing it again, but then too it is not being installed using all the possible means.
Error message that is being displayed is
MongoDB Setup Wizard ended prematurely because of an error. Your system has not been modified.
The file concrt140.dll is part of the Microsoft Visual C++ Redistributable. Installing that first should allow you to complete this installation..
first open command prompt using administrator
after open you go to folder where setup is store using cmd(
and enter your setup name(use cd command for go one folder to another)

Resolve "Binaries not found" error in Postgres.app

I'm following these instructions to set up PostgreSQL on my Mac. Step 3 says I need to click Initialize, however there's no such button. Instead, the error message "Binaries not found" is displayed and, if I click the similar Start button, the error message "The binaries for this PostgreSQL server were not found" is displayed. I just downloaded a clean version of Postres.app, so not sure why this wouldn't be working right out of the box.
How to resolve?
I found this answer by stromal on Postgres.app's GitHub:
I solved it by opening up the application's sliding windows, than clicked a new server with the plus icon, than that had initialization button, than clicked initialise than it worked.
The hidden sidebar slideout was tricky. This solution worked for me!
Postgres.app's troubleshooting and support page says the following:
To fix this issue, make sure that the correct binaries for your server are in
/Applications/Postgres.app/Contents/Versions/
without telling you how to actually do that.
One way to do it is to download "Postgres.app with all currently supported PostgreSQL versions" from Postgres.app's download page and replace any other versions you have. The app will then open without the "Binaries not found" error, assuming that you are only using supported PostgreSQL versions.
Follow the official uninstall instructions:
Quit Postgres.app & drag it to the Trash
Delete the data directory (default location: ~/Library/Application Support/Postgres)
Delete preferences for Postgres.app by executing the following command: defaults delete com.postgresapp.Postgres2
Remove the $PATH config for the command line tools (optional): sudo rm /etc/paths.d/postgresapp
Follow the official installation instructions.

After I update to MacOs Catalina MAMP stop working

I have a folder on my Desktop named work where I keep all my php projects. I use MAMP and all projects are set to work on virtual hosts, for example, if I have a project named test I access this project on this URL http://test.dev.
Everything went ok until I updated to macOS Catalina when I started to have this error.
(1)Operation not permitted: Can't open directory for index: /Users/username/Desktop/work/php/development/projectname.
I set the permissions to the work folder and all subfolders to be read & write for my user and staff group, I tried all the terminal permission
commands: chmod 777, 755, etc.
I had the same problem like you, and I spent many days to solve it by doing:
stop MAMP, then open terminal and type
sudo /Applications/MAMP/bin/startApache.sh -> then Enter
and then type your admin password to give apache full privileges to start apache. (this way can let MAMP read any files on your Mac, include external drives)
now you can open MAMP and see that Apache is started, then click Start on MAMP app to start MySql too.
I've solved doing the following operations:
Quit MAMP and all the applications that are using mySql and Apache Server (stop all the instances)
Go to System Preferences, Systema & Privacy, Full Disk Access Tab
Click "add" and go to /Applications/MAMP/Library/bin and add apachectl
Run this command from the terminal: sudo /Applications/MAMP/bin/startApache.sh\
Open MAMP and press the Start Servers button
now you should be able to start your localhost app
This could be due to wrong permission given by the new MacOS Catalina permission manager. A possible way to solve this issue is to check if the folder in which the project is stored can be accessed by your Application.
To do this you have to:
Go to System Preferences
Go to System & Privacy
Go to Files and Folders
Be sure that the folder of your project is checked in the subsection concerning your Application
I hope this could solve your problem.
Prior to the steps below I added Full disk access to MAMP under the Security and Privacy Folder.
The steps I did after:
Stop MAMP
Open terminal
Then type: /Applications/MAMP/bin/startApache.sh
Start MAMP
Incase it wont work, try on the terminal: /Applications/MAMP/bin/stopApache.sh and then /Applications/MAMP/bin/startApache.sh
I had a similar problem with XAMPP. Apache just lost access to my external drive, which I included via a symlink. Even giving "Full Disk Access" to the httpd webserver didn't help.
The final solution was to start Apache with the sudo command:
sudo Applications/XAMPP/bin/apachectl start
did the job for me. Please note that
sudo apachectl start
would start the Apache that comes with macOS and thus wouldn't be used with XAMPP (and MAMP as well, I guess).

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

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