Home > Uncategorized > doctrine:insert-sql for MAMP users

doctrine:insert-sql for MAMP users

August 10th, 2009 Leave a comment Go to comments

One of my computers has MAMP installed. I was trying to build a database schema from a YAML file. When time came to insert the SQL using…

>php symfony doctrine:insert-sql

the following error message appeared:

>Couldn’t locate driver named mysql

MySQL worked fine on this computer for many years so a missing driver was out of the question. After some thinking I realized that the command “php” actually refers to OS X version of php and not the one that ships with MAMP. Since I was too lazy to properly configure the extensions for the OS X version, I simply pointed the “php” command to the MAMP version using the following line:

>alias php=’/Applications/MAMP/bin/php5/bin/php’

I ran the symfony command again and it worked perfectly!

  1. Giacomo
    April 29th, 2010 at 11:46 | #1

    I LOVE YOU ANNA FILINA!! i was trying to work it out this problem and you solved it!!! thanks a lot!

  2. Higor Morais
    May 31st, 2010 at 09:15 | #2

    thanks a lot, u save my work time.

  3. tomahoax
    August 13th, 2010 at 14:25 | #3

    Thanx a lot, it saved my evening !!! :)

  1. No trackbacks yet.