Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to deploy a php app using addon cleardb/mysql with no success.

What i do is:

git init
git add .
git commit -m "First commit"

heroku create --stack cedar

git push heroku master

heroku addons:add cleardb:ignite

heroku config | grep CLEARDB_DATABASE_URL

heroku config:add DATABASE_URL='mysql://'

After that i configure my php app using:


    $server = $url["host"];
    $username = $url["user"];
    $password = $url["pass"];
    $db = substr($url["path"],1);

    mysql_connect($server, $username, $password);



And when i test to connect, i'm getting error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

What can i do? Please, any help?



Ok, i've solved my own question setting server configuration manually:

$server = "";
$username = "adffdadf2341";
$password = "adf4234";
$db = "heroku_db";

Now i have new problem, heroku db:push is not working

!    Taps Load Error: cannot load such file -- taps/operation
!    You may need to install or update the taps gem to use db commands.
!    On most systems this will be:
!    sudo gem install taps

I've installed gem and still same error...

share|improve this question
Please, any help? – Eusthace Feb 4 '13 at 13:12

You don't do that


getenv = get an environnment on your unix.



is good.

share|improve this answer

Your Answer


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.