Trying to run python manage.py migrate on a djangoFramework project but receiving errors
Following a tutorial on youtube on how to set up and use the DjangoFramework. Tried running python manage.py migrate but I ran into this error and I'm unable to figure out a solution to it. Using mysqlclient and running on a virtual environment and on MACOS
django.db.utils.OperationalError: (1045, "Access denied for user
'root'@'localhost' (using password: YES)")
I don't know if this would be the issue, but I created a database on using the myphpadmin on http://localhost:8080/phpmyadmin/. localhost/phpmyadmin does not work.
The code for DATABASES in settings.py is as follows :
DATABASES =
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : 'rootpassword',
'HOST': 'localhost',
'PORT' : '' ,
python mysql django
|
show 7 more comments
Following a tutorial on youtube on how to set up and use the DjangoFramework. Tried running python manage.py migrate but I ran into this error and I'm unable to figure out a solution to it. Using mysqlclient and running on a virtual environment and on MACOS
django.db.utils.OperationalError: (1045, "Access denied for user
'root'@'localhost' (using password: YES)")
I don't know if this would be the issue, but I created a database on using the myphpadmin on http://localhost:8080/phpmyadmin/. localhost/phpmyadmin does not work.
The code for DATABASES in settings.py is as follows :
DATABASES =
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : 'rootpassword',
'HOST': 'localhost',
'PORT' : '' ,
python mysql django
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
port is3306
.
– Stack
Nov 13 '18 at 16:36
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
did you create a database nameddjangoproject
in mysql
– Stack
Nov 13 '18 at 16:38
|
show 7 more comments
Following a tutorial on youtube on how to set up and use the DjangoFramework. Tried running python manage.py migrate but I ran into this error and I'm unable to figure out a solution to it. Using mysqlclient and running on a virtual environment and on MACOS
django.db.utils.OperationalError: (1045, "Access denied for user
'root'@'localhost' (using password: YES)")
I don't know if this would be the issue, but I created a database on using the myphpadmin on http://localhost:8080/phpmyadmin/. localhost/phpmyadmin does not work.
The code for DATABASES in settings.py is as follows :
DATABASES =
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : 'rootpassword',
'HOST': 'localhost',
'PORT' : '' ,
python mysql django
Following a tutorial on youtube on how to set up and use the DjangoFramework. Tried running python manage.py migrate but I ran into this error and I'm unable to figure out a solution to it. Using mysqlclient and running on a virtual environment and on MACOS
django.db.utils.OperationalError: (1045, "Access denied for user
'root'@'localhost' (using password: YES)")
I don't know if this would be the issue, but I created a database on using the myphpadmin on http://localhost:8080/phpmyadmin/. localhost/phpmyadmin does not work.
The code for DATABASES in settings.py is as follows :
DATABASES =
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : 'rootpassword',
'HOST': 'localhost',
'PORT' : '' ,
python mysql django
python mysql django
edited Nov 13 '18 at 18:00
theBuzzyCoder
1,0511521
1,0511521
asked Nov 13 '18 at 16:31
bernard angbernard ang
12
12
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
port is3306
.
– Stack
Nov 13 '18 at 16:36
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
did you create a database nameddjangoproject
in mysql
– Stack
Nov 13 '18 at 16:38
|
show 7 more comments
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
port is3306
.
– Stack
Nov 13 '18 at 16:36
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
did you create a database nameddjangoproject
in mysql
– Stack
Nov 13 '18 at 16:38
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
port is
3306
.– Stack
Nov 13 '18 at 16:36
port is
3306
.– Stack
Nov 13 '18 at 16:36
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
did you create a database named
djangoproject
in mysql– Stack
Nov 13 '18 at 16:38
did you create a database named
djangoproject
in mysql– Stack
Nov 13 '18 at 16:38
|
show 7 more comments
1 Answer
1
active
oldest
votes
If you are connecting with phpmyadmin by default no password set.
And also write port number.
DATABASES = {
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : '',
'HOST': 'localhost',
'PORT' : '3306' ,
Change password of phpmyadmin
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
|
show 5 more comments
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285486%2ftrying-to-run-python-manage-py-migrate-on-a-djangoframework-project-but-receivin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you are connecting with phpmyadmin by default no password set.
And also write port number.
DATABASES = {
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : '',
'HOST': 'localhost',
'PORT' : '3306' ,
Change password of phpmyadmin
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
|
show 5 more comments
If you are connecting with phpmyadmin by default no password set.
And also write port number.
DATABASES = {
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : '',
'HOST': 'localhost',
'PORT' : '3306' ,
Change password of phpmyadmin
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
|
show 5 more comments
If you are connecting with phpmyadmin by default no password set.
And also write port number.
DATABASES = {
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : '',
'HOST': 'localhost',
'PORT' : '3306' ,
Change password of phpmyadmin
If you are connecting with phpmyadmin by default no password set.
And also write port number.
DATABASES = {
'default':
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER' : 'root',
'PASSWORD' : '',
'HOST': 'localhost',
'PORT' : '3306' ,
Change password of phpmyadmin
edited Nov 13 '18 at 17:22
answered Nov 13 '18 at 16:55
TimmaTimma
8829
8829
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
|
show 5 more comments
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
Tried this. Gave me the same error with (using password :NO) instead
– bernard ang
Nov 13 '18 at 16:59
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
@bernardang go to phpmyadmin dashboard click the User accounts tab then check User name 'root' and Host 'localhost' then Edit privileges of this account. Then change password of this account.
– Timma
Nov 13 '18 at 17:17
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
Was I supposed to change it to what I put it as in the DATABASES code ?I did that and now I am getting Access Denied error. "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
– bernard ang
Nov 13 '18 at 17:30
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
I have actually gotten it to work. by changing the settings on XAMPP. However, I still cant get phpmyadmin to work on localhost/phpmyadmin or localhost:8000/phpmyadmin where the server on my django app is run on.Any fix to this?
– bernard ang
Nov 13 '18 at 17:54
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
[Access denied error solution. ](stackoverflow.com/questions/19482371/…)
– Timma
Nov 13 '18 at 17:57
|
show 5 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285486%2ftrying-to-run-python-manage-py-migrate-on-a-djangoframework-project-but-receivin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
did you update your settings.py?
– Stack
Nov 13 '18 at 16:34
edited the post. does updating settings.py mean putting values like i shown in the DATABASES ?
– bernard ang
Nov 13 '18 at 16:35
port is
3306
.– Stack
Nov 13 '18 at 16:36
@Stack Tried that but it still gave the same error
– bernard ang
Nov 13 '18 at 16:37
did you create a database named
djangoproject
in mysql– Stack
Nov 13 '18 at 16:38