lsof -i :3000
kill -9 <PID>
lsof -i :3000
kill -9 <PID>
Run the below command from your terminal
pg_dump -h <host> -U <username> -f <filename>.sql
<database-name>
If you only want to download schema of the database add --schema-only
pg_dump -h <host> -U <username> -f <filename>.sql --schema-only <database-name>
heroku logs --tail --dyno=web --remote heroku
heroku logs --tail --dyno=web -a urgency-dev
PG::ConnectionBad: 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”
$ brew services stop postgresql $ rm /usr/local/var/postgres/postmaster.pid # adjust path accordingly to your install $ brew services start postgresql
another solution that worked for me https://dba.stackexchange.com/a/209337
sudo lsof -i tcp:3306
Quit MySQL
sudo launchctl unload -F /Library/LaunchDaemons/homebrew.mxcl.mysql@5.7.plist
sudo chown -R _mysql:mysql /usr/local/var/mysql && sudo brew services restart mysql@5.7
Apache
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
MySQL
brew services start mysql
brew services stop mysql
brew services restart mysql
[Postfix]
mailq
sudo postsuper -d ALL
sudo postsuper -d ALL deferred
brew services start memcached