103

The problem can also be attributed to a crashed process that left postmaster.pid file behind. $ brew services stop postgresql $ rm /usr/local/var/postgres/postmaster.pid # adjust path accordingly to your install $ brew services start postgresql


56

Based on this blog post http://ilikekillnerds.com/2014/08/fixing-sequel-pro-sql-encoding-error-for-imported-sql-files/ When importing your database dump, you need to select Western (Mac OS Roman) as the encoding format for the file to import without issue.


52

The answer is here. Run this command to manually start the server: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start


51

I was getting the same Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? loop of Homebrew install / start / stop / restart to no avail... Finally, brew postgresql-upgrade-database worked. Seems I was on 9.6 instead of 10.4, and something my latest App Store restart restarted all my database servers...


41

“Elephant” icon menu When pgAdmin is running, an elephant icon menu appears. Look at the upper right corner of the screen. The elephant refers to Slonik, the Postgres mascot. Choose New pgAdmin Window menu item. FYI, pgAdmin 4 is built as a web app, not a desktop app, even when run locally on your own computer. Note that the internal web server provided ...


36

You can use HomeBrew, see the official MongoDB HomeBrew page. Just add the tap: brew tap mongodb/brew And then after adding the tap from above, you can then install the Mongo shell with: brew install mongodb-community-shell


24

pg_config shows a lot of information including the data directory: CONFIGURE = '--disable-debug' '--prefix=/usr/local/Cellar/postgresql/9.3.2' '--datadir=/usr/local/Cellar/postgresql/9.3.2/share/postgresql' '--docdir=/usr/local/Cellar/postgresql/9.3.2/share/doc/postgresql' '--enable-thread-safety' '--with-bonjour' '--...


23

No, SQL Server will not run on macOS (it can run on Apple hardware, if you use Boot Camp and boot natively to Windows). Otherwise you will need to install virtualization software of some sort, where you install Windows in a VM, and install SQL Server there - I use Parallels Desktop, but there is also VMWare Fusion and Oracle VirtualBox. (I haven't tested the ...


20

I have been banging my head against this error today on OSX Yosemite with MySQL 5.7 recently updated with Homebrew. Following suggestions on StackOverflow and elsewhere, I hunted around after my.cnf files all of which specified bind-address=0.0.0.0. I even removed and reinstalled MySQL following these instructions and then reinstalled using brew install ...


18

EDIT Recently SQL Server was released for linux. This makes using Docker a viable solution to "running sql server on mac". You can find some details on how to do this here: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker. Old answer If you have a mac and do not want to run a virtual machine, there are a few options. You can grab ...


16

A conversation about this on GitHub led to an interim "quick fix" solution: open ~/.editrc and add: bind "^R" em-inc-search-prev Apparently the bigger issue is that PostgresApp uses libedit instead of libreadline. And supposedly libedit lacks some command-line features of libreadline, so until PostgresApp is compiled against libreadline, just use ...


15

Appears "the way" to install the client, if you want to use hombrew, is: $ brew install postgresql then psql (the client command line) will now be available to you (it also installs a local Postgres server/database, but you don't have to use that if all you want is the client). Apparently there's also a 'wrapper' to psql to make it more "user friendly" ...


14

If you don't have any data, then it seems like a problem with Brew. Did you run brew upgrade, there are two answers on StackOverflow that address this, I've merged both of them together to try the best of both worlds. Backing up launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist sudo mv /usr/local/var/postgres /usr/local/var/....


12

Do NOT create a tablespace on a removable external drive, especially if you have other data in that PostgreSQL install you care about. If the external drive is missing then PostgreSQL will fail to start, and be extremely difficult to repair. I've submitted a patch to add more prominent warnings about this in the latest version's manual. You had the right ...


12

I've just resolved the same problem. It's just because I forgot to run it properly before use. For pure installing postgresql on Mac OS, the process will be (using brew command): brew install postgresql then if you want to automatically run postgresql at login: ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents or else you just want to run ...


11

I strongly recommend using Postgres.app from the Heroku team, which is also supported by them! It has a menubar icon and the menu has a psql item: You will also find psql included here if you want the same version of that as the server (path may vary by version): /Applications/Postgres.app/Contents/MacOS/bin If you want, you can add this path to your ...


11

You can download the latest Mongo Shell for MacOS from the following URL: https://downloads.mongodb.org/osx/mongodb-shell-osx-ssl-x86_64-3.6.2.tgz For the sake of completion, the Mongo Shell for Windows is available at https://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.2-signed.msi Furthermore, for other Linux distributions, I ...


8

I very strongly recommend that you do not put a tablespace on an external removable drive. If the tablespaces disappears (ie: drive unplugged) you risk severe database corruption that will be difficult to recover from. You'll likely find permissions management a challenge, too. You should generally initdb a new database cluster on the drive, then start it ...


7

Running locate my.cnf found the file /usr/local/etc/my.cnf Edit that file and set bind-address = 0.0.0.0 Restart mysql: brew services restart mysql


7

Update For best solution, see Answer by Burmistrov. Web browser As for launching the app causing a page to open in your default web browser, Yes, that is the new normal. Per an email on the psgsql-announce email sent by Dave Page on 2018-04-13: The desktop runtime now runs as a system tray application and utilises the browser on the system to display ...


6

Create the new database, then create a tablespace on your external drive: CREATE TABLESPACE mytablespace LOCATION '/Volumes/externaldisk/pg'; Then alter the database so that the new tablespace is the default location for it: ALTER DATABASE MYDB TABLESPACE mytablespace; The other way to do this is to just move your entire Postgres data directory to the ...


6

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket"/var/pgsql_socket/.s.PGSQL.5432"? I kept on getting the above error and none of the above solutions worked for me. Finally the following solution solved my problem on Mac OS X Install postgres using brew brew ...


6

According to the README included in the dmg file, postgres binaries are installed in /usr/local/pgsql/bin/. You should add these lines in your ~/.bashrc : export PSQL_DIR=/usr/local/pgsql/bin/ export PATH="$PSQL_DIR:$PATH" Update your environment with source ~/.bashrc or run a new shell and psql should be available.


6

[This question is almost a year old, but anyways I just came across it while investigating the same issue, and although the answer is probably no longer relevant for you, it might be for someone else reading this.] This can happen when using the standard MySQL installation including the MySQL preference pane. When opening the MySQL preference pane, it will ...


6

Yes you can have MySQL as independent ZIP archive and it is also available for download in MySQL download page for windows, do the following steps Download ZIP archive Extract/UN-zip the archive Change the default ini file if needed You may also install service or start mysqld from cmd prompt using cd \bin mysqld.exe or if service is needed to be ...


6

There are some issues with this request: What version and edition of SQL Server is the target system? How much data is being imported? 10k, 10 Mb, more? How many CSV files are there? You have stated that handling of double-quotes is required, implying text-qualified fields and embedded text-qualifiers. Will there also be embedded field delimiters (i.e. , )? ...


6

postgres user The user account named postgres (by default) created by the installer is actually a macOS user account. Apple allows deleting a user account in the more recent versions of macOS: System Preferences > Users & Groups > - button in list, after authenticating with padlock icon in lower corner. In older macOS versions that do not delete user ...


5

The problem is indeed as @Phil hinted at. To fix it, set the permissions for the _mysql user: > cd ~ > touch mysql.log > sudo chown _mysql:wheel mysql.log Restart MySQL after that and the log file will be used.


5

The reason is that it is wise to run the database processes under a separate account. At least one advantage of this is that the OS processes as safer in the case of the database server being hacked. On the other side the database related files are safer from the 'normal' user accounts too - the PostgreSQL cluster (or at least its data) is relatively easy ...


5

I hope you need to create the user for remote access with '%' wildcard and grant permissions on DB's. Step 1: In my.cnf (https://serverfault.com/questions/9107/how-do-i-find-where-mysql-is-loading-its-config-from) comment out your bind address # bind-address = xxx.xxx.xxx.xxx And restart MySQL Server. Step 2: Then you need to grant permissions ...


Only top voted, non community-wiki answers of a minimum length are eligible