Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use postgresql with mamp

I would like to use mamp and postgresql, do you know how this is possible?

I have a postgresql database, and I already use mamp and mysql, but I can not find documentation to use postgresql with mamp

Sorry for my bad english ;)

like image 991
Fluidouix Avatar asked Dec 07 '25 02:12

Fluidouix


2 Answers

"mamp" appears to be a canned installer for MySQL + Apache + PHP for Mac OS X.

There are related things for PostgreSQL; see the download page. But otherwise, all the components are easily installed individually. Many people use things like Homebrew.

like image 146
Craig Ringer Avatar answered Dec 10 '25 02:12

Craig Ringer


Look at this for the answer.

https://www.drupal.org/node/1438206

Postgres on Max OS X with MAMP

Last updated February 13, 2012. Created on February 13, 2012.
Edited by diricia. Log in to edit this page. At the moment I'm running MAMP Pro, but the setup should work with MAMP free version as well. Requirments; Download and install MAMP from MAMP

1. Download and install postgres 8.4 or higher from Enterprise DB
2. Add the bin directory of postgres, /Library/PostgreSQL/8.4/bin to the PATH in your .bashrc file in your home directory. Remember to run ./.bashrc to update the path.
3. Sudo to your root user and execute the following commands. '>' is the prompt on your terminal and should be excluded. Text in () is an explanation and should not excluded.
    a. > su postgres (log in as the postgres user)
    b. > createuser --no-createdb --no-password (choose as a super user)
    c. > createuser --no-createdb ----pwprompt devel (enter a password 'drupal', and choose as a super user, this is if your site is using the standard devel user with password drupal)
> exit
4. Edit table at the bottom of the /Library/PostgreSQL/8.4/data/pg_hba.conf file to so that the options for local look like this. This states that the devel (or your user) must have a md5 password and all other users can log in with no password. (This is only recommended for your local host and is not secure on a server)
        # "local" is for Unix domain socket connections only
        local all devel md5
        local all all trust 
5. In your applications folder stop and start the postgres server using the apps under the Postgres folder
6. Log out of your root user
7. Create your postgres database as specified in INSTALL.pgsql.txt:
    a. > createdb --encoding=UTF8 --owner=username databasename (The owner is devel or the user you created)
like image 36
Dean Avatar answered Dec 10 '25 04:12

Dean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!