Opened 16 years ago

Closed 12 years ago

#10803 closed New feature (wontfix)

dbshell should try 'mysql5' as well for executable name

Reported by: hwaara@… 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)

db_executable_name.diff (6.1 KB ) - added by hwaara@… 16 years ago.
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.
db_executable_name.2.diff (5.7 KB ) - added by Håkan W 16 years ago.
Better diff

Download all attachments as: .zip

Change History (13)

comment:1 by Alex Gaynor, 16 years ago

Component: UncategorizedDatabase layer (models, ORM)

by hwaara@…, 16 years ago

Attachment: db_executable_name.diff added

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.

comment:2 by Alex Gaynor, 16 years ago

Please create diffs relative to the root of the Django source tree, not your filesystem.

comment:3 by Håkan W, 16 years ago

Has patch: set
Owner: changed from nobody to anonymous
Status: newassigned

New patch coming up.

comment:4 by Håkan W, 16 years ago

Owner: changed from anonymous to Håkan W
Status: assignednew

by Håkan W, 16 years ago

Attachment: db_executable_name.2.diff added

Better diff

comment:5 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:6 by Malcolm Tredinnick, 14 years ago

Triage Stage: Design decision neededAccepted

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 Adam Nelson, 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 Chris Beaven, 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:9 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:10 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:11 by Claude Paroz, 12 years ago

Resolution: wontfix
Status: newclosed

I don't think this is Django's task to try various executable names. This can be solved at system level by aliasing commands.

Note: See TracTickets for help on using tickets.
Back to Top