--
Ticket URL: <https://code.djangoproject.com/ticket/31491>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => NeoXtreme
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:1>
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here https://code.djangoproject.com/ticket/5024
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
> I shall create a pull request in a while.
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here https://code.djangoproject.com/ticket/5024
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
I shall create a pull request f the ticket is accepted.
(My apologies for any mistake, I am new to bug-tracking system)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:2>
* Attachment "ticket_31491.diff" added.
patch file
* has_patch: 0 => 1
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here https://code.djangoproject.com/ticket/5024
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
> I shall create a pull request f the ticket is accepted.
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here [https://code.djangoproject.com/ticket/5024]
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
I shall create a pull request f the ticket is accepted.
(My apologies for any mistake, I am new to bug-tracking system)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:3>
* type: Bug => Cleanup/optimization
* version: 3.0 => master
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
`passwd` from `OPTIONS` is passed to a `--password` argument so it
shouldn't cause any connection failures. However I agree that we can unify
this. We can add a small release note (even if it's not documented).
Please send patch via GitHub.
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:4>
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here [https://code.djangoproject.com/ticket/5024]
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
> I shall create a pull request f the ticket is accepted.
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here [https://code.djangoproject.com/ticket/5024]
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
Pull request submitted: [https://github.com/django/django/pull/12763]
(My apologies for any mistake, I am new to bug-tracking system)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:5>
Comment (by Maruti N Sharma):
Replying to [comment:4 felixxm]:
> `passwd` from `OPTIONS` is passed to a `--password` argument so it
shouldn't cause any connection failures. However I agree that we can unify
this. We can add a small release note (even if it's not documented).
Please send patch via GitHub.
I understand that, but it should not attempt to get the "passwd" from
settings_dict instead of "password", which would cause connection failure
if there is no "passwd" key specified in django db settings (only
"password" key) .
I apologise if description wasn't clear enough. I will add reproduction
steps.
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:6>
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here [https://code.djangoproject.com/ticket/5024]
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
>
> Pull request submitted: [https://github.com/django/django/pull/12763]
>
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here [https://code.djangoproject.com/ticket/5024]
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
Pull request submitted: [https://github.com/django/django/pull/12763]
steps to reproduce:
---------------------------------
- create a new django project, set env
- choose mysql as db back-end
- specify db setting as following (ref:
[https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-
DATABASES])
{{{
# use actual db username, password etc
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mydatabase',
'USER': 'mydatabaseuser',
'PASSWORD': 'mypassword',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
}}}
- Open a terminal and activate respective environment
- run: ''python manage.py dbshell''
- You should get following error: **Access denied for user
'mydatabaseuser'@'localhost' (using password: NO)**
(My apologies for any mistake, I am new to bug-tracking system)
--
Comment (by Maruti N Sharma):
Added steps to reproduce.
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:7>
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here [https://code.djangoproject.com/ticket/5024]
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
>
> Pull request submitted: [https://github.com/django/django/pull/12763]
>
> steps to reproduce:
> ---------------------------------
> - create a new django project, set env
> - choose mysql as db back-end
> - specify db setting as following (ref:
> [https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-
> DATABASES])
>
> {{{
> # use actual db username, password etc
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'mydatabase',
> 'USER': 'mydatabaseuser',
> 'PASSWORD': 'mypassword',
> 'HOST': '127.0.0.1',
> 'PORT': '5432',
> }
> }
> }}}
>
> - Open a terminal and activate respective environment
> - run: ''python manage.py dbshell''
> - You should get following error: **Access denied for user
> 'mydatabaseuser'@'localhost' (using password: NO)**
>
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here [https://code.djangoproject.com/ticket/5024]
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
Pull request submitted: [https://github.com/django/django/pull/12763]\\
\\
\\
**Steps to reproduce:**
- create a new django project, set env
- choose mysql as db back-end
- specify db setting as following (ref:
[https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-
DATABASES])
{{{
# use actual db username, password etc
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mydatabase',
'USER': 'mydatabaseuser',
'PASSWORD': 'mypassword',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
}}}
- Open a terminal and activate respective environment
- run: ''python manage.py dbshell''
- You should get following error: **Access denied for user
'mydatabaseuser'@'localhost' (using password: NO)**
(My apologies for any mistake, I am new to bug-tracking system)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:8>
Old description:
> For MySql, "passwd" has been replaced with "password" long time ago,
> please check here [https://code.djangoproject.com/ticket/5024]
> But dbshell command still looks for "passwd" key in the settings for db
> password, resulting in connection error.
> This behaviour is also slightly different than other back-ends.
>
> Pull request submitted: [https://github.com/django/django/pull/12763]\\
> \\
> \\
>
> **Steps to reproduce:**
>
> - create a new django project, set env
> - choose mysql as db back-end
> - specify db setting as following (ref:
> [https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-
> DATABASES])
>
> {{{
> # use actual db username, password etc
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'mydatabase',
> 'USER': 'mydatabaseuser',
> 'PASSWORD': 'mypassword',
> 'HOST': '127.0.0.1',
> 'PORT': '5432',
> }
> }
> }}}
>
> - Open a terminal and activate respective environment
> - run: ''python manage.py dbshell''
> - You should get following error: **Access denied for user
> 'mydatabaseuser'@'localhost' (using password: NO)**
>
> (My apologies for any mistake, I am new to bug-tracking system)
New description:
For MySql, "passwd" has been replaced with "password" long time ago,
please check here [https://code.djangoproject.com/ticket/5024]
But dbshell command still looks for "passwd" key in the settings for db
password, resulting in connection error.
This behaviour is also slightly different than other back-ends.
Pull request submitted: [https://github.com/django/django/pull/12763]
(My apologies for any mistake, I am new to bug-tracking system)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:9>
Comment (by felixxm):
Maruti, steps are incorrect. Django looks for `passwd` in `OPTIONS` and
for `PASSWORD` in `DATABASES['alias']`, if not provided. All works
properly.
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:10>
Comment (by Maruti N Sharma):
Of course, my mistake, I have updated my comment and the description as
well. Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:11>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:12>
* owner: Maruti N Sharma => Hasan Ramezani
* needs_better_patch: 1 => 0
Comment:
[https://github.com/django/django/pull/13050 New PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:13>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9e8edc1e5511f128dec6bcd70a10ebd263b76280" 9e8edc1]:
{{{
#!CommitTicketReference repository=""
revision="9e8edc1e5511f128dec6bcd70a10ebd263b76280"
Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on
MySQL.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31491#comment:14>