1

I'd like to add a couple of command-line arguments to my Django's ./manage.py dbshell command, and I can't figure out how.

In specific I'd like to add -A to prevent MySQL from scanning every table and every column, and --prompt=LOCAL: since I frequently keep multiple shells open.

I can't figure out how to do this! I'm only idea is to create my own "mysql" command in /usr/local/bin and have it be a wrapper for mysql with my own flags. But I'd really like to avoid doing that.

1 Answer 1

1

No, there is no direct way to do this.

You need to modify the code django/db/backends/mysql/client.py. Don't worry, it is eay.

2
  • 1
    this reads more like a comment, see How to Answer Commented May 21, 2015 at 4:53
  • "No, it cannot be done" is very much an answer. And it even explains how to achieve it. Upvoted. Commented Jul 2, 2015 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.