Closed (duplicate)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
Tests
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jul 2011 at 02:12 UTC
Updated:
11 Apr 2013 at 14:47 UTC
Messing with phpunit.xml is a pain, we should just read creds from ~/.my.cnf if it exists.
Attached patch seems to work for me.
| Comment | File | Size | Author |
|---|---|---|---|
| drush_test_my_cnf.patch | 1.34 KB | msonnabaum |
Comments
Comment #1
jonhattannice addition. It also works for me
Comment #2
moshe weitzman commentedComment #3
moshe weitzman commentedShould we not consult the php.ini settings - http://us.php.net/manual/en/mysql.configuration.php as well. Not sure what takes precedence.
Comment #4
owen barton commentedJust noticed this also - I think it would be good if this worked in sql commands also (plus si etc), in addition to the tests. We would need to figure out behaviour - I think the ideal would be to allow db-url to include partial URLs (in a similar way to runserver - we could probably repurpose the code) such that the unknowns are filled in by the values found in my.cnf's/php.ini if possible. So if you have your user/pass/host/port in my.cnf, you could just use something along the lines of --db-url=mysql://databasename.
Comment #5
bryan kennedy commentedI agree that this patch needs some work, but I just wanted to mention that this would be useful to get fixed. Right now when my deploy scripts roll out a site, I have to pass the mysql credentials in the open to Drush. I think deploy systems that use Drush would be the primarily beneficiary from this change.
Comment #6
bryan kennedy commentedActually after doing some searching, I am wondering if it's valid to mark this as a duplicate of this longer conversation about this same issue:
http://drupal.org/node/671906
In the interest of starting up the conversation again, but in only one place, I'm going to go ahead and mark this as closed(duplicate), but feel free to correct me if someone disagrees.