Is there a way to find all postgresql and mysql databases on my system? (Perhaps using the find command).
2 Answers
If the database servers are running, ask them:
psql -l mysql <<< 'show databases'
Just searching the filesystem for relational databases is not a trivial task.
On my system, the files for postgresql 8.4 are installed in:
sudo ls -l /etc/postgresql/8.4/main/pgdata/base/ sudo ls -l /var/lib/postgresql/8.4/main/base
where /etc contains a symbolic link to /var/lib.
You need sudo permissions to watch these directories.