nginx-flask-mysql: error after typing localhost #633

Closed
opened 2026-03-07 21:20:48 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @guessvic on GitHub (Jul 9, 2021).

Hello,

OS:

  • Ubuntu 20.04
  • Docker version 20.10.7

I created and copied contents from each file in corresponding folders inside nginx-flask-mysql respectively.

Folders are in same path named:

  • backend
  • db
  • proxy

A file in the same path of those folders above named:

  • docker-compose.yml

I ran the following code without problem:

docker-compose up

I can see them running by the following code:

docker ps

I opened the browser and typed:

http://localhost OR
http://localhost:5000

And returned:

500 Internal Server Error
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I entered the database and found out the database this example created has no tables. Is that why???

Can someone please help me.

Thank you.

Running Server:

1

500 Error in Browsing:

2

Originally created by @guessvic on GitHub (Jul 9, 2021). Hello, OS: - Ubuntu 20.04 - Docker version 20.10.7 I created and copied contents from each file in corresponding folders inside nginx-flask-mysql respectively. Folders are in same path named: - backend - db - proxy A file in the same path of those folders above named: - docker-compose.yml I ran the following code without problem: `docker-compose up` I can see them running by the following code: `docker ps` I opened the browser and typed: [http://localhost](url) OR [http://localhost:5000](url) And returned: > 500 Internal Server Error > Internal Server Error > The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. I entered the database and found out the database this example created has no tables. Is that why??? Can someone please help me. Thank you. ### Running Server: ![1](https://user-images.githubusercontent.com/70531793/125057242-98be4c80-e0db-11eb-96fc-8c6ea65fad36.jpg) ### 500 Error in Browsing: ![2](https://user-images.githubusercontent.com/70531793/125057255-9bb93d00-e0db-11eb-85b4-cd20a4c0dbf4.jpg)
Author
Owner

@aiordache commented on GitHub (Jul 9, 2021):

Hi @guessvic. From your screenshot, looks like a DB authentication issue.

@aiordache commented on GitHub (Jul 9, 2021): Hi @guessvic. From your screenshot, looks like a DB authentication issue.
Author
Owner

@guessvic commented on GitHub (Jul 9, 2021):

Hi @guessvic. From your screenshot, looks like a DB authentication issue.

Hello @aiordache,

Thanks for the reply. Could you please let me know how do I fix this issue if it is??

Thanks!

@guessvic commented on GitHub (Jul 9, 2021): > Hi @guessvic. From your screenshot, looks like a DB authentication issue. Hello @aiordache, Thanks for the reply. Could you please let me know how do I fix this issue if it is?? Thanks!
Author
Owner

@guessvic commented on GitHub (Jul 10, 2021):

Update:

I changed the password to correspond with the password of mysql database and it worked...

I have no idea why the original code below inside the hello.py didn't work, even after I'd chmod +x for all related files / folders:

...
password=pf.read(),
...

I've tried the following code below from this stack overflow post and it didn't work for my situation:

SELECT user, authentication_string, plugin, host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';
FLUSH PRIVILEGES;

Please someone help to clarify the problem.

Thanks!

@guessvic commented on GitHub (Jul 10, 2021): ### Update: I changed the password to correspond with the password of mysql database and it worked... I have no idea why the original code below inside the **hello.py** didn't work, even after I'd chmod +x for all related files / folders: `...` `password=pf.read(),` `...` I've tried the following code below from this [stack overflow post](https://stackoverflow.com/questions/64936683/mysql-connector-errors-programmingerror-1045-28000-access-denied-for-user-r) and it didn't work for my situation: `SELECT user, authentication_string, plugin, host FROM mysql.user;` `ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';` `FLUSH PRIVILEGES;` Please someone help to clarify the problem. Thanks!
Author
Owner

@guessvic commented on GitHub (Jul 12, 2021):

Update:

I changed the password to correspond with the password of mysql database and it worked...

I have no idea why the original code below inside the hello.py didn't work, even after I'd chmod +x for all related files / folders:

...
password=pf.read(),
...

I've tried the following code below from this stack overflow post and it didn't work for my situation:

SELECT user, authentication_string, plugin, host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';
FLUSH PRIVILEGES;

Please someone help to clarify the problem.

Thanks!

Last Update

git clone the project itself fixed the problem without any problem though still no clue the cause.

@guessvic commented on GitHub (Jul 12, 2021): > ### Update: > I changed the password to correspond with the password of mysql database and it worked... > > I have no idea why the original code below inside the **hello.py** didn't work, even after I'd chmod +x for all related files / folders: > > `...` > `password=pf.read(),` > `...` > > I've tried the following code below from this [stack overflow post](https://stackoverflow.com/questions/64936683/mysql-connector-errors-programmingerror-1045-28000-access-denied-for-user-r) and it didn't work for my situation: > > `SELECT user, authentication_string, plugin, host FROM mysql.user;` > `ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';` > `FLUSH PRIVILEGES;` > > Please someone help to clarify the problem. > > Thanks! ### Last Update git clone the project itself fixed the problem without any problem though still no clue the cause.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-compose#633