Unable to connect to db via console with a custom config directory path I've just used yiic for the first time for a plugin record installation and found that the db.php config file didn't seem to be picked up and I got database connection failures.

I added a console array to the file to try that but still no joy. So I edited the craft/app/etc/config/defaults/db.php with the username, password, table prefix and database name of my local install and it all works fine.

I've not tried this on a vanilla Craft install but I'm guessing that this may be because my config directory has been renamed to config-mydomainname as we are running 2 craft sites off of one craft instance.

That works by way of the following in the ./public_html/index.php file:

define('CRAFT_CONFIG_PATH', '../craft/config-mydomainname/');


Is this change of path causing the issue with the console?
I ran into something very similar to this today. I have a custom path for plugins, as a result I could no longer run the plugin console commands because yiic.php is looking in the default path as specified by its defines. You need to let yiic.php know about your custom paths and unfortunately I don't think this is possible at the moment without hacking it.