Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm running Mac OS X 10.7. How can I know whether MySQL, SQLite, PostgreSQL, etc. are installed on the system?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Try the Terminal command mdfind (string) | grep include

For example:

$ mdfind postgres | grep include
/usr/include/postgresql/server/postgres_fe.h
/usr/include/postgresql/server/postgres_ext.h
/usr/include/postgresql/server/postgres.h
/usr/include/postgresql/internal/postgres_fe.h
/usr/include/postgres_ext.h
...

$ mdfind sqlite | grep include
/usr/include/sqlite3ext.h
/usr/include/sqlite3.h
/usr/include/php/ext/sqlite3/libsqlite/sqlite3.h
/usr/include/php/ext/sqlite/libsqlite/src/sqlite.h
...

This is a good way to determine if there are header files installed for the respective database libraries you ask about.

share|improve this answer
2  
At least MySQL is only the PHP support for it. There is no MySQL server in the client version unless you install it separately. The PostgreSQL is also related to the Apache webserver, but I'm not sure exactly what it is for. –  ughoavgfhw Jan 18 '12 at 21:55
1  
Thank you very much. And thank you to ughoavgfhv, too. I have the client version, installed no one of them, and needed to know whether any of them came preinstalled with the OS. I was in doubt because PHP & Apache ARE preinstalled instead. –  ignis Jan 18 '12 at 21:57
add comment

You can consult the list of open source products that ship as part of Lion and Lion Server.

Also a mdfind command can list all the executable files that have been indexed and you can grep for specific file names to filter out the excess results. This will show any files installed not from Apple's original payload with Lion.

mdfind "kMDItemKind == 'Unix Executable File'" | grep -w sqlite3

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.