Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
3
votes
1
answers
441
views
Installing Postgresql parray_gin extension on mac, include not found
I am trying to install `parray_gin` in PostgreSQL 10 on macOS, but I can't get it to build. I'm running `pgxn install parray_gin`. This first gave me a missing `stdio.h` error, so I installed the xcode command line tools, and now it's complaining about /Library/PostgreSQL/10/include/postgresql/serve...
I am trying to install
parray_gin
in PostgreSQL 10 on macOS, but I can't get it to build.
I'm running pgxn install parray_gin
. This first gave me a missing stdio.h
error, so I installed the xcode command line tools, and now it's complaining about
/Library/PostgreSQL/10/include/postgresql/server/utils/pg_locale.h:19:10:
fatal error: 'unicode/ucol.h' file not found
After some Googling it appeared I needed to install an extra library, which I did through brew install icu4c
This printed:
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
But it didn't change a thing and I have no idea how to pass /usr/local/opt/icu4c/include
to pgxn
Joris
(131 rep)
Feb 28, 2018, 08:16 AM
• Last activity: Jun 5, 2025, 08:05 PM
3
votes
2
answers
1171
views
macOS Catalina - postgreSQL - sysctl.conf still relevant?
I had the following settings in /etc/sysctl.conf before Catalina: # PostgreSQL Config for the MAC kern.sysv.shmmax=2147483648 kern.sysv.shmall=524288 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.maxprocperuid=1024 kern.maxproc=2048 The Catalina install moved this file to the /Users...
I had the following settings in /etc/sysctl.conf before Catalina:
# PostgreSQL Config for the MAC
kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=1024
kern.maxproc=2048
The Catalina install moved this file to the /Users/Shared folder as /etc is now considered private to macOS.
Are these settings still relevant for Catalina, and if so, where do they need to go?
Thx.
Crashmeister
(161 rep)
Nov 8, 2019, 04:09 PM
• Last activity: May 4, 2025, 03:03 AM
0
votes
1
answers
4889
views
pg_hba.conf and postgresql.conf in old installation directory
I have installed the PostgreSQL 9.4 on my MacBook via MacPorts, and I am trying to edit pg_hba.conf, but I don't see it in my current installation. Furthermore, psql is reporting that config_file is in my old 9.3 directory! How should I fix this? $ port select --list postgresql Available versions fo...
I have installed the PostgreSQL 9.4 on my MacBook via MacPorts, and I am trying to edit pg_hba.conf, but I don't see it in my current installation. Furthermore, psql is reporting that config_file is in my old 9.3 directory! How should I fix this?
$ port select --list postgresql
Available versions for postgresql:
none
postgresql93
postgresql94 (active)
$ psql --version
psql (PostgreSQL) 9.4.1
$ psql -U postgres -c 'SHOW config_file'
config_file
----------------------------------------------
/Library/PostgreSQL/9.3/data/postgresql.conf
(1 row)
$ ls /Library/PostgreSQL/9.3/data
PG_VERSION pg_hba.conf pg_notify pg_stat_tmp pg_xlog
base pg_ident.conf pg_serial pg_subtrans postgresql.conf
global pg_log pg_snapshots pg_tblspc postmaster.opts
pg_clog pg_multixact pg_stat pg_twophase postmaster.pid
$ ls /Library/PostgreSQL/9.4/data
ls: /Library/PostgreSQL/9.4/data: No such file or directory
$ ls /Library/PostgreSQL/9.4
ls: /Library/PostgreSQL/9.4: No such file or directory
$ psql -U postgres -c 'SHOW data_directory'
data_directory
------------------------------
/Library/PostgreSQL/9.3/data
(1 row)
$ locate pg_hba.conf
/Library/PostgreSQL/9.3/share/postgresql/pg_hba.conf.sample
/opt/local/share/postgresql93/pg_hba.conf.sample
/opt/local/share/postgresql94/pg_hba.conf.sample
$ ls /opt/local/share/postgresql94
conversion_create.sql postgres.bki snowball_create.sql
extension postgres.description sql_features.txt
information_schema.sql postgres.shdescription system_views.sql
pg_hba.conf.sample postgresql.conf.sample timezone
pg_ident.conf.sample psqlrc.sample timezonesets
pg_service.conf.sample recovery.conf.sample tsearch_data
Imran
(1 rep)
Mar 17, 2015, 04:50 PM
• Last activity: Apr 8, 2025, 10:09 AM
1
votes
1
answers
6611
views
PostgreSQL: managing the postmaster PID
I am running PostgreSQL on my localhost on MacOS. Every once in a while (~ every 5 times I reboot the computer), I face the following error when I try to connect to my local database instance: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepti...
I am running PostgreSQL on my localhost on MacOS. Every once in a while (~ every 5 times I reboot the computer), I face the following error when I try to connect to my local database instance:
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
When this happens, I have gotten used to the practice of opening the terminal, then running
rm -f /usr/local/var/postgres/postmaster.pid
which allows me to connect to the database. According to the documentation , having an old .PID file in the data directory "confuses" postgres and so it must be removed.
My question is, why must be this done intermittently and can one automate the removal of old .pid files ? Please note that
brew services restart postgres
does not resolve the issue - only the removal of the old .pid file works. Any advice here would be greatly appreciated!
iskandarblue
(219 rep)
Apr 5, 2021, 02:27 AM
• Last activity: Jan 23, 2025, 07:02 PM
0
votes
1
answers
401
views
Installed mysql 8 on Mac then mysql 5.7 now now they wont work
I have a brand new Macbook pro with Mojave. I installed mysql 8 using the dmg file but realized that Sequel Pro is not playing nice with it and after researching I decided to install mysql 5.7. This time I installed brew and did it. Sequel pro keeps shutting down and my previous database is showing...
I have a brand new Macbook pro with Mojave. I installed mysql 8 using the dmg file but realized that Sequel Pro is not playing nice with it and after researching I decided to install mysql 5.7. This time I installed brew and did it. Sequel pro keeps shutting down and my previous database is showing up even though I thought I removed it. Before I reset the mac and start over, is there a way I can completely remove mysql ( all versions ) from the computer and reinstall using brew just the 5.7 version?
If this is the wrong place to ask kindly let me know where I should ask and I will.
Scott
(1 rep)
Jun 1, 2019, 12:52 AM
• Last activity: Jan 10, 2025, 03:04 AM
6
votes
6
answers
72916
views
After fresh install getting `psql: command not found`
I downloaded and installed [PostgreSQL and PostGIS from KyngChaos]( http://www.kyngchaos.com/software/postgres) for my OS X 10.10 install. When I run `psql` I get, bash: psql: command not found According to the site https://dba.stackexchange.com/questions/3005/how-to-run-psql-on-mac-os-x it gets ins...
I downloaded and installed [PostgreSQL and PostGIS from KyngChaos]( http://www.kyngchaos.com/software/postgres) for my OS X 10.10 install. When I run
psql
I get,
bash: psql: command not found
According to the site https://dba.stackexchange.com/questions/3005/how-to-run-psql-on-mac-os-x it gets installed into /Library/PostgreSQL
. There is no file there.
four-eyes
(187 rep)
Apr 11, 2015, 03:17 PM
• Last activity: Nov 15, 2024, 12:11 PM
0
votes
0
answers
52
views
SQL Developer app crashes
I have downloaded SQL developer on my Mac running OS Sonoma 14.1.2 but as soon as i launch it it quits unexpectedly. I have installed latest JDK 11. I don't seem to find the reason for its crash. I executed sqldeveloper.sh in terminal and i encountered following error line 16: [: missing `]'/Library...
I have downloaded SQL developer on my Mac running OS Sonoma 14.1.2 but as soon as i launch it it quits unexpectedly. I have installed latest JDK 11. I don't seem to find the reason for its crash. I executed sqldeveloper.sh in terminal and i encountered following error
line 16: [: missing `]'/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
Wasim Wani
(101 rep)
Oct 20, 2024, 06:33 AM
• Last activity: Oct 20, 2024, 08:41 AM
0
votes
0
answers
223
views
Unable to connect to server connection failed: connection to server at 127.0,0,1 post 5432 failed could not receive data from server
I installed PgAdmin 4 to my MacBook Pro Sonoma version 14.4.x and once it opened I attempted to create a server or register a server and I have host name/address as localhost, port 5432, maintenance database of postgres and the username as the username of my machine, but I get an error message sayin...
I installed PgAdmin 4 to my MacBook Pro Sonoma version 14.4.x and once it opened I attempted to create a server or register a server and I have host name/address as localhost, port 5432, maintenance database of postgres and the username as the username of my machine, but I get an error message saying Unable to connect to server: connection failed: connection to server at 127.0.0.1 port 5432 failed: could not receive data from server: Connection refused.
What could be going on?
Daniel
(281 rep)
Oct 15, 2024, 01:09 PM
0
votes
1
answers
45
views
PostgreSQL setup issue on macOS Monterey: initdb error encoding mismatch
I'm having issue while installing [PostgreSQL 16][1] on macOS Monterey via MacPorts. So far, these looked OK: $ sudo port install postgresql16-server ---> Computing dependencies for postgresql16-server The following dependencies will be installed: postgresql16 Continue? [Y/n]: y ---> Fetching archiv...
I'm having issue while installing PostgreSQL 16 on macOS Monterey via MacPorts.
So far, these looked OK:
$ sudo port install postgresql16-server
---> Computing dependencies for postgresql16-server
The following dependencies will be installed: postgresql16
Continue? [Y/n]: y
---> Fetching archive for postgresql16
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information:
...
...
...
---> No broken files found.
---> No broken ports found.
---> Some of the ports you installed have notes:
postgresql16 has the following notes:
To use the postgresql server as a startup item install the postgresql16-server port.
postgresql16-server has the following notes:
To create a database instance, after install do
sudo port select postgresql postgresql16
sudo mkdir -p /opt/local/var/db/postgresql16/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql16/defaultdb
sudo -u postgres /bin/sh -c 'cd /opt/local/var/db/postgresql16 && /opt/local/lib/postgresql16/bin/initdb -D /opt/local/var/db/postgresql16/defaultdb'
Except at the last part:
$ sudo -u postgres /bin/sh -c 'cd /opt/local/var/db/postgresql16 && /opt/local/lib/postgresql16/bin/initdb -D /opt/local/var/db/postgresql16/defaultdb'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with this locale configuration:
provider: libc
LC_COLLATE: cs_CZ.ISO8859-2
LC_CTYPE: en_US.UTF-8
LC_MESSAGES: en_US.UTF-8
LC_MONETARY: en_US.UTF-8
LC_NUMERIC: en_US.UTF-8
LC_TIME: en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
initdb: error: encoding mismatch
initdb: detail: The encoding you selected (UTF8) and the encoding that the selected locale uses (LATIN2) do not match. This would lead to misbehavior in various character string processing functions.
initdb: hint: Rerun initdb and either do not specify an encoding explicitly, or choose a matching combination.
I have no idea how to fix this. Running
sudo -u postgres /bin/sh -c 'cd /opt/local/var/db/postgresql16 && /opt/local/lib/postgresql16/bin/initdb -D /opt/local/var/db/postgresql16/defaultdb -E UTF8'
gives same eror message.
Perhaps this can provide some hints:
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="cs_CZ.ISO8859-2"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
anta40
(103 rep)
Sep 20, 2024, 05:49 PM
• Last activity: Sep 23, 2024, 12:47 PM
0
votes
0
answers
104
views
Upgrading database instance for MongoDB 4.2 to 4.4 requires legacy MongoDB on Macosx
I'm running MongoDB within a ten year old node app, and in the process of upgrading node had to upgrade MongoDB. For some time, I have been using MongoDB community 4.4 to run the database, but in the process of upgrading to MongoDB community 7 (the latest) I got this error in the output log when I t...
I'm running MongoDB within a ten year old node app, and in the process of upgrading node had to upgrade MongoDB. For some time, I have been using MongoDB community 4.4 to run the database, but in the process of upgrading to MongoDB community 7 (the latest) I got this error in the output log when I tried to run mongod through "brew services restart mongodb/brew/mongodb-community@4.4:"
> "This version of MongoDB is too recent to start up on the existing data files. Try MongoDB 4.2 or earlier."
I have reinstalled 4.4: the newly installed version gives this error and fails, but the older 4.4 actually worked. (Curiously -- trying to run mongodb/brew/mongodb-community I get no error messages at all, no output to the log file, but nothing works).
Several questions:
1. Why does 4.4 not work now, when it did earlier? It appears I now have 4.4.29, as a result of the reinstallation. How can I go back to an earlier version?
2. Why does mongodb/brew/mongodb-community give no output to the logfile, appears to succeed but actually fails?
3. Is there a way of loading and running 4.2? Brew does not support anything before 4.4, it seems. Nor does there seem to be any way of installing and running mongodb 4.2 from the mongo site.
peter
(101 rep)
Aug 26, 2024, 07:55 AM
• Last activity: Aug 26, 2024, 12:20 PM
118
votes
11
answers
387898
views
How to run psql on Mac OS X?
I installed PostgreSQL on a computer with Mac OS X using the [One click installer][1]. 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 install something more? Or how can I configure Po...
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 install something more? Or how can I configure PostgreSQL so I can use it on my computer?
Jonas
(33975 rep)
May 28, 2011, 08:49 AM
• Last activity: Jun 28, 2023, 11:43 PM
1
votes
1
answers
1569
views
Can’t connect to local PostgresSQL server
I have the [Postres app][1] installed an running on my Mac. And it has worked beautifully. I don’t know what changed, but now I cannot connect to it from Rails, PG Commander, PG Admin or the command `psql -h localhost`. However, I can connect with just `psql`. I get the following error in the log as...
I have the Postres app installed an running on my Mac. And it has worked beautifully. I don’t know what changed, but now I cannot connect to it from Rails, PG Commander, PG Admin or the command
pg_hba.conf:
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
postgresql.conf: https://gist.github.com/davbeck/49a23a48fa161b3e06fc#file-gistfile1-txt
psql -h localhost
. However, I can connect with just psql
. I get the following error in the log as soon as the connection times out:
LOG: incomplete startup packet
Rails database.yml
development:
adapter: postgresql
database: my_db
host: localhost
PG Commander settings:

David Beck
(111 rep)
Jan 29, 2014, 12:06 AM
• Last activity: Apr 17, 2023, 03:06 AM
144
votes
15
answers
373598
views
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 Homebrew on my Mac, and I have no clue what is goi...
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 Homebrew on my Mac, and I have no clue what is going on. Previously, it had been working. At some point, I must've entered a command that messed things up. I'm not sure. Now, whenever I enter a SQL command from the command line, I receive the above message. I've run a command to check whether the server is running, and it apparently is not. If I attempt to start the server using
> $ postgres -D /usr/local/pgsql/data
I receive the following error:
> postgres cannot access the server configuration file
> "/usr/local/pgsql/data/postgresql.conf": No such file or directory
I've uninstalled and reinstalled Postgresql via Homebrew, but the problem persists. I'm completely at a loss as to how to get this working. Any help would be appreciated.
Michael P.
(2111 rep)
Aug 28, 2014, 02:50 PM
• Last activity: Apr 12, 2023, 07:12 PM
0
votes
0
answers
2333
views
Can not start MongoDB community edition on Mac
Following [Install MongoDB Community Edition on macOS](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/): Started like this: `brew services start mongodb-community@6.0` no error was raised, but when I do: `brew services list` ``` kukodajanos@Kukodas-MacBook-Pro ~ % brew services...
Following [Install MongoDB Community Edition on macOS](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/) :
Started like this:
brew services start mongodb-community@6.0
no error was raised, but when I do: brew services list
kukodajanos@Kukodas-MacBook-Pro ~ % brew services list
Name Status User File
mongodb-community error 3584 kukodajanos ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
mongodb-community@4.2 error 3584 kukodajanos ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community@4.2.plist
1. I stopped and restarted.
2. Reinstalled community edition
3. Restarted my computer
4. did sudo chmod 777 /tmp/mongodb-27017.sock
What else I can do?
See this in the logs, what is wrong?
kukodajanos@Kukodas-MacBook-Pro ~ % tail /opt/homebrew/var/log/mongodb/mongo.log
{"t":{"$date":"2022-11-21T11:32:37.516+01:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/opt/homebrew/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2022-11-21T11:32:37.516+01:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"Recovering data from the last clean checkpoint."}
{"t":{"$date":"2022-11-21T11:32:37.516+01:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3584M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2022-11-21T11:32:38.130+01:00"},"s":"E", "c":"WT", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1669026758:130299][4360:0x109930580], wiredtiger_open: [WT_VERB_DEFAULT][ERROR]: int __posix_open_file(WT_FILE_SYSTEM *, WT_SESSION *, const char *, WT_FS_OPEN_FILE_TYPE, uint32_t, WT_FILE_HANDLE **), 805: /opt/homebrew/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
Found this too: https://stackoverflow.com/a/60605550/239219
But databases in my case are not under /var/lib/
Are the files belong to mongodb-community@6.0
these?
kukodajanos@Kukodas-MacBook-Pro ~ % brew list mongodb-community@6.0
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/install_compass
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongod
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongos
/opt/homebrew/Cellar/mongodb-community/6.0.1/homebrew.mxcl.mongodb-community.plist
/opt/homebrew/Cellar/mongodb-community/6.0.1/MPL-2
/opt/homebrew/Cellar/mongodb-community/6.0.1/THIRD-PARTY-NOTICES
Tried this also:
kukodajanos@Kukodas-MacBook-Pro ~ % sudo chown -R mongodb:mongodb /opt/homebrew/var/mongodb
chown: mongodb: illegal group name
János
(101 rep)
Nov 21, 2022, 10:39 AM
• Last activity: Mar 15, 2023, 07:24 PM
5
votes
3
answers
1823
views
Differences in PostgreSQL 14 collation behavior on Linux and Mac
I have PostgreSQL installed on my Mac and Ubuntu Server as shown below: ``` atsweb=# select version(); version ------------------------------------------------------------------------------------------------------------------- PostgreSQL 14.6 on x86_64-apple-darwin20.6.0, compiled by Apple clang ver...
I have PostgreSQL installed on my Mac and Ubuntu Server as shown below:
atsweb=# select version();
version
-------------------------------------------------------------------------------------------------------------------
PostgreSQL 14.6 on x86_64-apple-darwin20.6.0, compiled by Apple clang version 12.0.0 (clang-1200.0.32.29), 64-bit
(1 row)
atsweb=# select version();
version
--------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 14.6 (Ubuntu 14.6-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, 64-bit
(1 row)
They have the same databases, collation and encoding:
atsweb=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
atsweb | atsweb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
However, when I specify a en_US.UTF-8
collation on Ubuntu, I get the error:
atsweb=# select 'test last name' < 'test2 last name' COLLATE "en_US.UTF8";
ERROR: collation "en_US.UTF8" for encoding "UTF8" does not exist
LINE 1: select 'test last name' < 'test2 last name' COLLATE "en_US.U...
Specifying en_US
collation works on Ubuntu but when I run the exact same statement as shown below, the results are different:
**Ubuntu:**
atsweb=# select 'test last name' < 'test2 last name' COLLATE "en_US";
?column?
----------
f
(1 row)
**Mac:**
atsweb=# select 'test last name' < 'test2 last name' COLLATE "en_US";
?column?
----------
t
(1 row)
Is this a misconfiguration on my end or a bug somewhere? Any leads on how I can fix this?
**Update:**
Tried on a postgresql-14.6 docker image and yielded the exact same results as in Ubuntu. Does it mean that it's the Mac installation that has the problem? Is 'test2 last name' supposed to go before 'test last name' under "en_US" or "en_US.UTF-8" collation?
Christian Alis
(151 rep)
Jan 31, 2023, 05:04 AM
• Last activity: Feb 3, 2023, 02:52 AM
0
votes
2
answers
2254
views
mysql starts and stops servers automatically non stop
I am working on macOS High Sierra. Basically, the problem is that for some reason the mysql server is starting and stopping automatically, and constantly. It does not stop. If I run: # ps -ax | grep mysql to see the processes even when I (think) I have uninstalled mysql, it shows: 54948 ttys002 0:00...
I am working on macOS High Sierra.
Basically, the problem is that for some reason the mysql server is starting and stopping automatically, and constantly. It does not stop. If I run:
# ps -ax | grep mysql
to see the processes even when I (think) I have uninstalled mysql, it shows:
54948 ttys002 0:00.00 grep mysql
I run the same thing 5 seconds later, and it has a different ID:
54950 ttys002 0:00.00 grep mysql
I cannot
sudo kill -9 54950
because by the time I try to kill it, it has already disappeared.
I have tried removing everything related to mysql. I then reinstall it, and the same thing happens. I have tried doing this with homebrew as well.
Please help.
easox
(9 rep)
Oct 21, 2019, 10:58 PM
• Last activity: Jan 4, 2023, 03:17 PM
1
votes
1
answers
6235
views
How do I upload an .mdf file to Azure Data Studio for Mac?
How could I access multiple databases at once using Azure Data Studio and import an existing .mdf file as one of those database, with tables and data that had been stored in that .mdf file?
How could I access multiple databases at once using Azure Data Studio and import an existing .mdf file as one of those database, with tables and data that had been stored in that .mdf file?
Jacob
(113 rep)
Oct 31, 2018, 10:57 PM
• Last activity: Nov 27, 2022, 03:13 PM
13
votes
4
answers
52490
views
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 without being idle, then on another tab, I can acces...
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 without being idle, then on another tab, I can access MySQL server.
However, without the ssh session running, I will get following error
> **ERROR 2003 (HY000):** Can't connect to MySQL server on 'SERVER_IP_ADDRESS' (60)
I've tried to modify
my.cnf
file on the server by commenting out bind-address or assigning it to 0.0.0.0
but it doesn't work.
Why is it like that? How can I configure the server so that it allows remote access without having to run ssh on the client? Can someone please help?
chepukha
(231 rep)
Jan 2, 2014, 05:10 AM
• Last activity: Aug 10, 2022, 04:24 PM
1
votes
1
answers
622
views
How can I monitor the import progress of a large CSV File in mysql?
I am trying to import an existing CSV file into my database and I want to see the progress. I usually use pipe viewer when I do my sql files but for csv files I cannot figure out how to do it. I use macOX 10.15 and mysql 8.02 (not home-brew). My idea was: > `pv users.csv | mysql -u user -p -db < Fil...
I am trying to import an existing CSV file into my database and I want to see the progress. I usually use pipe viewer when I do my sql files but for csv files I cannot figure out how to do it.
I use macOX 10.15 and mysql 8.02 (not home-brew).
My idea was:
>
pv users.csv | mysql -u user -p -db < File/to/users.csv
Without using PV I just connect to my mysql change to my db and use this command:
LOAD DATA INFILE '/File/to/users.csv' INTO TABLE users FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n';
but I do not the see process.
Shorty20
(11 rep)
May 9, 2020, 07:39 AM
• Last activity: Jul 26, 2022, 01:04 AM
209
votes
17
answers
361514
views
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` doesn't exist on my Mac. Using the answers prov...
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
doesn't exist on my Mac.
Using the answers provided below, I found that it was here:
/usr/local/var/postgres
randomguy
(2231 rep)
Feb 20, 2011, 12:10 PM
• Last activity: Jun 15, 2022, 10:09 AM
Showing page 1 of 20 total questions