Questions tagged [mac-os-x]

An operating system published by Apple.

163 questions
209
votes
17 answers

How do I find PostgreSQL's data directory?

I forgot how I started PostgreSQL the last time (it was months ago) and I don't remember where the data directory is located. The postgres command seems to require the location of the data directory. I'm on MacOsX if that helps. /usr/local/postgres…
randomguy
  • 2,231
  • 2
  • 14
  • 6
144
votes
15 answers

PostgreSQL not running on Mac

The error in its entirety reads: psql: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? This is my second time setting up Postgresql via…
Michael P.
  • 2,111
  • 2
  • 14
  • 8
118
votes
11 answers

How to run psql on Mac OS X?

I installed PostgreSQL on a computer with Mac OS X using the One click installer. Then I try to access PostgreSQL using the psql command, but it doesn't seem to be available. I get this message: psql -bash: psql: command not found Do I have to…
Jonas
  • 33,945
  • 27
  • 62
  • 64
45
votes
4 answers

Is it possible to install just the mongo Shell?

I have Docker installed and am running a MongoDB container for my local development on my Mac. The problem is that I can't connect to said DB easily from CLI. I have Robo 3T installed, but I would prefer to use the CLI client instead. Is there a…
CodeChimp
  • 553
  • 1
  • 4
  • 5
40
votes
3 answers

pgAdmin 4 version 3 fails to open a second time

I just installed pgAdmin 4 version 3.0.0 for macOS Sierra, replacing the pgAdmin that came bundled with Postgres 10.3 running locally on the same Mac. I opened the pgAdmin 4.app app icon, which caused Safari browser to come to the front with a tab…
Basil Bourque
  • 11,188
  • 20
  • 63
  • 96
34
votes
14 answers

PostgreSQL is running locally but I cannot connect. Why?

Recently updated my machine from Mac OS X Lion (10.7.4) to Mountain Lion (10.8) and I think it borked my PostgreSQL installation. It was installed originally via Homebrew. I'm not a DBA, but hoping someone can tell me how to troubleshoot this. I am…
Meltemi
  • 777
  • 3
  • 9
  • 14
29
votes
1 answer

Cannot locally import UTF-8 encoded SQL database on Mac

I was importing a confirmed UTF-8 encoded SQL database into Sequel Pro on Mac and got thrown this error halfway through: An error occurred when reading the file, as it could not be read in the encoding you selected (Autodetect - Unicode…
28
votes
1 answer

Is there a psql equivalent of bash's reverse-search-history?

I am very fond of bash's reverse-search-history (C-r) (command-line feature): Search backward starting at the current line and moving ‘up’ through the history as necessary. This is an incremental search. When I hit control-r in bash, I get the…
user664833
  • 1,969
  • 3
  • 21
  • 19
16
votes
4 answers

SQL Server on Mac

Can SQL Server engine express edition be installed on OS X? I use a MacBook at home and would like to use it as a testing/learning platform for SQL Server.
user33664
14
votes
5 answers

MySQL server has gone away obstructing import of large dumps

I am trying to import a large sql dump (2GB) to my local mysql on my mac. I have been able to do this in the past (I was using MAMP), but now I get a ERROR 2006 (HY000) at line 7758: MySQL server has gone away everytime I try to import the…
naxoc
  • 241
  • 1
  • 2
  • 5
13
votes
4 answers

Can't remote access MySQL server running on Mac OS X

I have a MySQL server running on my work computer, which runs Mac OS X Maverick. I want to access it from home computer, which also has Mac OS Maverick. From terminal, if in 1 tab, I ssh into my work computer and just let the ssh session sit there…
chepukha
  • 231
  • 1
  • 2
  • 3
13
votes
3 answers

mysqld keeps automatically restarting

I am running mysqld on Mac OSX Al Capitan. After boot up, I ran mysql.server start to start mysqld server. But when I ran mysql.server stop, or sudo mysql.server stop, it just stopped for a while, later it will automatically restart itself again. I…
Zhang Buzz
  • 245
  • 1
  • 2
  • 10
12
votes
3 answers

Homebrew installed PostgreSQL could not connect, database files are incompatible with server

Here's the error message I'm getting today when I attempt to log in to my localhost PosgreSQL databases using psql: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix…
workerjoe
  • 173
  • 1
  • 1
  • 8
10
votes
5 answers

Is there a Portable MySQL

For teaching and testing purposes I would like to run MySQL without actually having to install it. I have found portable PostgreSQL for both Macintosh and Windows, which is good, but have been unable to find the same for mySQL. I know that I can run…
Manngo
  • 3,065
  • 10
  • 38
  • 61
9
votes
1 answer

How to properly align columns in SQLite?

I recently began learning with SQLite, and I am trying to output the data of a table into the Terminal (macOS). However, the result after I've set .mode column or .mode tab is not properly aligned when some columns have no data, such in the second…
Yannis Dran
  • 193
  • 1
  • 4
1
2 3
10 11