question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem with localhost my sql

See original GitHub issue

first of all, your tutorial is impressive. but i have a problem in mysql section.

when i click the article button,register or login there’s exception like this:

_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

i change the parameter of app.run() with `app.run(debug=True,host = ‘0.0.0.0’) but, it doesn’t work.

and

i am confused with app.secret_key='secret123' what does it mean that code?

`

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
xmen1412commented, Jul 19, 2018

thanks a lot. it;s been 5 month i asked this problem and i already solve this problem by myself. the problem was i didn’t create a database in localhost. that’s all

0reactions
ianmubangizicommented, Sep 22, 2018

@saurabh10022000 Check if you have set the config correctly with the right database information or can you show a print out of the error, please.

Example:

Config MySQL

app.config[‘MYSQL_HOST’] = ‘localhost’ app.config[‘MYSQL_USER’] = ‘root’ app.config[‘MYSQL_PASSWORD’] = ‘#########’ app.config[‘MYSQL_DB’] = ‘#########’ app.config[‘MYSQL_CURSORCLASS’] = ‘DictCursor’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connect MySQL through localhost not working but 127.0.0.1 is ...
Whenever I try connecting to MySQL using a php script like the one below it doesn't work and gives me the error: no...
Read more >
B.3.2.2 Can't connect to [local] MySQL server
The error (2003) Can't connect to MySQL server on ' server ' (10061) indicates that the network connection has been refused. You should...
Read more >
How to fix MySQL can't connect to server on localhost (10061 ...
Make sure that your MySQL service is actually running · MySQL service is missing from the Services panel · Check that you are...
Read more >
Can't connect to MySQL server on localhost - Yawin Tutor
Check that mysql is running or not in the database server. The mysql server may be switched off or stopped due to some...
Read more >
6.2.22 Troubleshooting Problems Connecting to MySQL
Make sure that the server is running. · It might be that the server is running, but you are trying to connect using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found