problem with localhost my sql
See original GitHub issuefirst 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:
- Created 6 years ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
@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’