Python Forum

Full Version: Stuck with SQL, singup page plz HELP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hallo,

I don't know what to do!

I am following tutorial: https:https://www.youtube.com/watch?v=0FsvqwRhYdM&t=688s

and I get stuck with command line: from Guestbook import db . It says "Cannot import name db". I don't know what db is or how is it supposed to work.

next command line is db.create_all(). I am stuck here!!!!

I tried another approach using MySQL Workbench. https://dev.mysql.com/doc/workbench/en/w...ction.html

When I try to Test Connection I get message Can't connect to MySQL server on '127.0.0.1' (10061)


and this is where I end. Tutorial assumes it will work but I am getting error messages only. I am also getting error message when I try to install MySQL Community 5.7.200.msi . And Windows Power Shell is crashing when I try to open the console. I don't know if it is related, just saying.



Plase! All I am trying to do is simple Singup Page where you can input your data and it will be stored.

Can anyone suggest turtorial that will work for me please? Or explain me what is wrong?


I am getting frustrated here :'( . So far I was able to do all - learn Python, HTML code, install Flask, pips, make simple web on 127.1.1.5000, but now I am completely stuck and all fails. I am frustrated!


just in case, py code:

from flask import Flask, render_template

app = Flask(__name__)

@app.route('/')
def index():
	return render_template('index2.html')

@app.route('/sign')
def sign():
	return render_template('sign.html')

@app.route('/home', methods=['GET', 'POST'])
def home():
	links = ['https://www.youtube.com', 'https://www.bing.com', 'https://www.python.org', 'https://www.enkato.com']
	return render_template('example.html', links=links)

if __name__ == '__main__':
	app.run(debug=True)
For all your comprehensive help and patient attitude, thank you, thank you very much!!!!
EDIT:

When I copy files to python folder and run console, it takes app and "db" BUT it says "No module names MySQLdb"

Plz. what to do with that???


ah, I see, it has smt. to do with http://mysql-python.sourceforge.net/MySQLdb.html

damn, being self-teacher really sux...