Opened 16 years ago
Closed 12 years ago
#10803 closed New feature (wontfix)
dbshell should try 'mysql5' as well for executable name
Reported by: | Owned by: | Håkan W | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Many of us who install mysql through MacPorts on OS X have the mysql executable named "mysql5". So when I try to do {{( python manage.py dbshell }} , I get this error:
./manage.py dbshell Error: You appear not to have the 'mysql' program installed or on your path.
I propose that django should also try to use the client with this executable name ("mysql5") rather than just failing if it can't find "mysql".
Attachments (2)
Change History (13)
comment:1 by , 16 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|
by , 16 years ago
Attachment: | db_executable_name.diff added |
---|
comment:2 by , 16 years ago
Please create diffs relative to the root of the Django source tree, not your filesystem.
comment:3 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
New patch coming up.
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:5 by , 15 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:6 by , 14 years ago
Triage Stage: | Design decision needed → Accepted |
---|
Haven't reviewed the patch in too much detail for subtle problems (it commits the sin of doing two things in one patch, making life harder for reviewers), but the concept is sound. If that binary name is going to be common for a large set of users, then it's worth supporting, since trying one extra binary name is hardly challenging.
comment:7 by , 14 years ago
Most developers are using HomeBrew for Mac development now and I've never run into any other installation that uses 'mysql5' for the mysql CLI. I propose that this be dropped if there isn't momentum to write a test and for anybody else to mark this as ready for checkin.
comment:8 by , 14 years ago
Patch needs improvement: | set |
---|---|
Severity: | → Normal |
Type: | → New feature |
It'd also be nicer if the change continued to respect executable_name
as other backends may rely on this.
comment:11 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I don't think this is Django's task to try various executable names. This can be solved at system level by aliasing commands.
Make the different backends' clients share the code for executing the dbshell, and make it possible to specify a list of executable names to try.