⌨️ A simple PHP script to parse ClearDB MySQL environment variable on Heroku.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
parseClearDbUrl.php

README.md

Clear DB Parse Url

A simple PHP script to parse CLEARDB_DATABASE_URL environment var for ClearDB MySQL add-on on Heroku.

Usage

php -f parseClearDBUrl.php "mysql://abc123456789:123456@eu-cdbr-west-02.cleardb.net/heroku_def123456789?reconnect=true"

mysql://abc123456789:123456@eu-cdbr-west-02.cleardb.net/heroku_def123456789?reconnect=true is the CLEARDB_DATABASE_URL config var of your Heroku app.

Display

Array
(
    [scheme] => mysql
    [host] => eu-cdbr-west-02.cleardb.net
    [user] => abc123456789
    [pass] => 123456
    [path] => /heroku_def123456789
    [query] => reconnect=true
)