SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

Stack Overflow


The old fashioned way

RECENT TUNES

December 31, 2009 – 5:44pm “Could not create database for c…o use near” error with Doctrine / Symfony

I was trying to use the symfony command line tools to rebuild my test database and I couldn’t get past this error:

>> doctrine Could not create database for c...o use near '-sb-test' at line 1

Turns out the issue is with the “-” in my test database name. Replacing the hyphens with underscores fixed the problem.

One Response to “Could not create database for c…o use near” error with Doctrine / Symfony

  1. gotnospirit says:

    I reached the same problem but normally if you set quote identifier to true it must solve the problem. unfortunately for CLI command, it seems that doctrine creates a “temp connection” who don’t give a damn about any options (Doctrine/Connection.php line 1512)… so while this isn’t fixed, the best solution is to not use “-” in the database name :(

    happy new year